forked from bblanchon/ArduinoJson
Reduced code size (-6 bytes)
This commit is contained in:
1 parent
0154fc15cb
commit
c32642e130
1 file changed
+8
-12
@@ -24,24 +24,20 @@ static void unescapeString(char* s)
|
||||
{
|
||||
char* readPtr = s;
|
||||
char* writePtr = s;
|
||||
char c;
|
||||
|
||||
while (true)
|
||||
do
|
||||
{
|
||||
if (*readPtr == '\\')
|
||||
c = *readPtr++;
|
||||
|
||||
if (c == '\\')
|
||||
{
|
||||
readPtr++;
|
||||
*writePtr = unescapeChar(*readPtr);
|
||||
}
|
||||
else
|
||||
{
|
||||
*writePtr = *readPtr;
|
||||
c = unescapeChar(*readPtr++);
|
||||
}
|
||||
|
||||
if (*writePtr == 0) break;
|
||||
*writePtr++ = c;
|
||||
|
||||
readPtr++;
|
||||
writePtr++;
|
||||
}
|
||||
} while (c != 0);
|
||||
}
|
||||
|
||||
char* JsonToken::getText()
|
||||
|
||||
Reference in new issue
Block a user