Browse Source

Fix plFormat bug preventing anything after an escape ("{{") from being processed

Michael Hansen 10 years ago
parent
commit
fb0fc2fdb6
  1. 5
      Sources/Plasma/CoreLib/plFormat.cpp

5
Sources/Plasma/CoreLib/plFormat.cpp

@ -66,7 +66,7 @@ namespace plFormat_Private
static void _fetchPrefixChunk(_IFormatDataObject &data) static void _fetchPrefixChunk(_IFormatDataObject &data)
{ {
do { for ( ;; ) {
const char *next = _scanNextFormat(data); const char *next = _scanNextFormat(data);
if (*next && *(next + 1) == '{') { if (*next && *(next + 1) == '{') {
// Escaped '{' // Escaped '{'
@ -78,7 +78,8 @@ namespace plFormat_Private
if (next != data.fFormatStr) if (next != data.fFormatStr)
data.fOutput.append(data.fFormatStr, next - data.fFormatStr); data.fOutput.append(data.fFormatStr, next - data.fFormatStr);
data.fFormatStr = next; data.fFormatStr = next;
} while (0); break;
};
} }
FormatSpec _FetchNextFormat(_IFormatDataObject &data) FormatSpec _FetchNextFormat(_IFormatDataObject &data)

Loading…
Cancel
Save