Skip to content
Snippets Groups Projects
Commit 1b440a55 authored by Federico's avatar Federico
Browse files

Fix unserializeUnknown not returning the correct error code

parent 2fa0bcdc
No related branches found
Tags gh-5233
No related merge requests found
......@@ -97,7 +97,9 @@ int unserializeUnknown(const TypePool& tp, const void *buffer, int bufSize)
const char *name=buf;
buf+=nameSize+1;
bufSize-=nameSize+1;
return tp.unserializeUnknownImpl(name,buf,bufSize)+nameSize+1;
auto result=tp.unserializeUnknownImpl(name,buf,bufSize);
if(result<0) return result;
return result+nameSize+1;
}
string peekTypeName(const void *buffer, int bufSize)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment