Changeset 2961 for trunk


Ignore:
Timestamp:
Apr 10, 2012, 4:25:09 PM (13 years ago)
Author:
gah
Message:

don't decode unencoded-strings (converting utf-8 string inadvertantly)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lang/tcl/src/RpEncodeTclInterface.cc

    r2959 r2961  
    278278
    279279    string = Tcl_GetStringFromObj(objv[last], &numBytes);
    280     if (switches.flags == 0) {
    281         if (strncmp(string, "@@RP-ENC:", 9) != 0) {
    282             /* This string doesn't have a header, so it's not encoded.
    283              * Just return the string as-is. */
    284             Tcl_SetObjResult(interp, objv[last]);
    285             return TCL_OK;
    286         }
     280    if ((switches.flags == 0) && (strncmp(string, "@@RP-ENC:", 9) != 0)) {
     281        /* This string doesn't have a header, so it's not encoded.
     282         * Just return the string as-is. */
     283        Tcl_SetObjResult(interp, objv[last]);
     284        return TCL_OK;
    287285    }
    288286    Rappture::Buffer buf(string, numBytes);
Note: See TracChangeset for help on using the changeset viewer.