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

Fix decoding of overencoded booleans.

if the value was >32bit with the low bits all being zero, it was decoded as
false instead of as true.

Fixes #6863
Thomas Van Lenten преди 5 години
родител
ревизия
668eb3b4e6
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      objectivec/GPBCodedInputStream.m

+ 1 - 1
objectivec/GPBCodedInputStream.m

@@ -203,7 +203,7 @@ int64_t GPBCodedInputStreamReadSInt64(GPBCodedInputStreamState *state) {
 }
 
 BOOL GPBCodedInputStreamReadBool(GPBCodedInputStreamState *state) {
-  return ReadRawVarint32(state) != 0;
+  return ReadRawVarint64(state) != 0;
 }
 
 int32_t GPBCodedInputStreamReadTag(GPBCodedInputStreamState *state) {