Преглед на файлове

refactor decode_array_index_from_pointer

Max Bruckner преди 8 години
родител
ревизия
4642d6575f
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      cJSON_Utils.c

+ 1 - 1
cJSON_Utils.c

@@ -229,7 +229,7 @@ static cJSON_bool decode_array_index_from_pointer(const unsigned char * const po
         return 0;
     }
 
-    for (position = 0; (pointer[position] >= '0') && (*pointer <= '9'); position++)
+    for (position = 0; (pointer[position] >= '0') && (pointer[0] <= '9'); position++)
     {
         parsed_index = (10 * parsed_index) + (size_t)(pointer[position] - '0');