Ignore:
Timestamp:
Aug 30, 2010, 12:27:36 PM (15 years ago)
Author:
[email protected]
Message:

2010-08-30 Andy Estes <[email protected]>

Reviewed by Eric Carlson.

Strings returned by asciiDebug() should be NULL-terminated.
https://bugs.webkit.org/show_bug.cgi?id=44866

  • wtf/text/WTFString.cpp: (asciiDebug):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/text/WTFString.cpp

    r66159 r66401  
    971971    const UChar* characters = impl->characters();
    972972
    973     buffer.resize(length);
     973    buffer.resize(length + 1);
    974974    for (unsigned i = 0; i < length; ++i) {
    975975        UChar ch = characters[i];
    976976        buffer[i] = ch && (ch < 0x20 || ch > 0x7f) ? '?' : ch;
    977977    }
     978    buffer[length] = '\0';
    978979
    979980    return buffer;
Note: See TracChangeset for help on using the changeset viewer.