Author: wlux
Date: Fri Jul  3 12:38:23 2015
New Revision: 38743

URL: http://svn.gna.org/viewcvs/gnustep?rev=38743&view=rev
Log:
Fix bug parsing JSON strings containing backslashes.

Modified:
    libs/webservices/trunk/ChangeLog
    libs/webservices/trunk/GWSJSONCoder.m

Modified: libs/webservices/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/webservices/trunk/ChangeLog?rev=38743&r1=38742&r2=38743&view=diff
==============================================================================
--- libs/webservices/trunk/ChangeLog    (original)
+++ libs/webservices/trunk/ChangeLog    Fri Jul  3 12:38:23 2015
@@ -1,3 +1,9 @@
+2015-07-03  Wolfgang Lux  <[email protected]>
+
+       * GWSJSONCoder.m (newParsed): Fix bug parsing JSON strings
+       containing backslashes, which would result in the returned string
+       being empty.
+
 2015-03-17 Richard Frith-Macdonald  <[email protected]>
 
        * GWSXMLRPCCoder.m: add more checks when strict parsing in use.

Modified: libs/webservices/trunk/GWSJSONCoder.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/webservices/trunk/GWSJSONCoder.m?rev=38743&r1=38742&r2=38743&view=diff
==============================================================================
--- libs/webservices/trunk/GWSJSONCoder.m       (original)
+++ libs/webservices/trunk/GWSJSONCoder.m       Fri Jul  3 12:38:23 2015
@@ -230,8 +230,8 @@
        {
           char  *buf;
           int   len;
-          int   pos = ctxt->index;
-          int   end = ctxt->index - start - 1;
+          int   pos = start;
+          int   end = ctxt->index - 1;
 
           buf = malloc(ctxt->index - start - 1);
           for (len = 0; pos < end; len++)


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to