sphinx-relay/protobuf_long.patch

14 lines
601 B
Diff
Raw Permalink Normal View History

diff --git a/node_modules/protobufjs/src/decoder.js b/node_modules/protobufjs/src/decoder.js
index 491dd30..cfaa927 100644
--- a/node_modules/protobufjs/src/decoder.js
+++ b/node_modules/protobufjs/src/decoder.js
@@ -72,7 +72,7 @@ function decoder(mtype) {
("}");
if (types.long[field.keyType] !== undefined) gen
- ("%s[typeof k===\"object\"?util.longToHash(k):k]=value", ref);
+ ("%s[util.Long.isLong(k)?k.toString():typeof k===\"object\"?util.longToHash(k):k]=value", ref);
else gen
("%s[k]=value", ref);