Explorar o código

print_number: Return buffer + offset instead of beginning of the number

Max Bruckner %!s(int64=8) %!d(string=hai) anos
pai
achega
e78bc42362
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      cJSON.c

+ 1 - 1
cJSON.c

@@ -381,7 +381,7 @@ static unsigned char *print_number(const cJSON * const item, printbuffer * const
 
     output_buffer->offset += (size_t)length;
 
-    return output_pointer;
+    return output_buffer->buffer + output_buffer->offset;
 }
 
 /* parse 4 digit hexadecimal number */