Fix some cases of reading of 64bit map values.
Fixes https://github.com/google/protobuf/issues/3164.
This commit is contained in:
parent
d6470abef1
commit
46f36d79a2
@ -406,7 +406,7 @@ static void ReadValue(GPBCodedInputStream *stream,
|
||||
valueToFill->valueInt32 = GPBCodedInputStreamReadInt32(&stream->state_);
|
||||
break;
|
||||
case GPBDataTypeInt64:
|
||||
valueToFill->valueInt64 = GPBCodedInputStreamReadInt32(&stream->state_);
|
||||
valueToFill->valueInt64 = GPBCodedInputStreamReadInt64(&stream->state_);
|
||||
break;
|
||||
case GPBDataTypeSInt32:
|
||||
valueToFill->valueInt32 = GPBCodedInputStreamReadSInt32(&stream->state_);
|
||||
|
@ -1149,22 +1149,27 @@ static NSData *DataFromCStr(const char *str) {
|
||||
[msg.mapInt32Int32 setInt32:101 forKey:2001];
|
||||
[msg.mapInt64Int64 setInt64:1002 forKey:202];
|
||||
[msg.mapInt64Int64 setInt64:103 forKey:2003];
|
||||
[msg.mapInt64Int64 setInt64:4294967296 forKey:4294967297];
|
||||
[msg.mapUint32Uint32 setUInt32:1004 forKey:204];
|
||||
[msg.mapUint32Uint32 setUInt32:105 forKey:2005];
|
||||
[msg.mapUint64Uint64 setUInt64:1006 forKey:206];
|
||||
[msg.mapUint64Uint64 setUInt64:107 forKey:2007];
|
||||
[msg.mapUint64Uint64 setUInt64:4294967298 forKey:4294967299];
|
||||
[msg.mapSint32Sint32 setInt32:1008 forKey:208];
|
||||
[msg.mapSint32Sint32 setInt32:109 forKey:2009];
|
||||
[msg.mapSint64Sint64 setInt64:1010 forKey:210];
|
||||
[msg.mapSint64Sint64 setInt64:111 forKey:2011];
|
||||
[msg.mapSint64Sint64 setInt64:4294967300 forKey:4294967301];
|
||||
[msg.mapFixed32Fixed32 setUInt32:1012 forKey:212];
|
||||
[msg.mapFixed32Fixed32 setUInt32:113 forKey:2013];
|
||||
[msg.mapFixed64Fixed64 setUInt64:1014 forKey:214];
|
||||
[msg.mapFixed64Fixed64 setUInt64:115 forKey:2015];
|
||||
[msg.mapFixed64Fixed64 setUInt64:4294967302 forKey:4294967303];
|
||||
[msg.mapSfixed32Sfixed32 setInt32:1016 forKey:216];
|
||||
[msg.mapSfixed32Sfixed32 setInt32:117 forKey:2017];
|
||||
[msg.mapSfixed64Sfixed64 setInt64:1018 forKey:218];
|
||||
[msg.mapSfixed64Sfixed64 setInt64:119 forKey:2019];
|
||||
[msg.mapSfixed64Sfixed64 setInt64:4294967304 forKey:4294967305];
|
||||
[msg.mapInt32Float setFloat:1020.f forKey:220];
|
||||
[msg.mapInt32Float setFloat:121.f forKey:2021];
|
||||
[msg.mapInt32Double setDouble:1022. forKey:222];
|
||||
|
Loading…
Reference in New Issue
Block a user