Explorar el Código

Update protobuf.js

Lutz Roeder hace 4 años
padre
commit
dab2f7810b
Se han modificado 1 ficheros con 12 adiciones y 1 borrados
  1. 12 1
      source/protobuf.js

+ 12 - 1
source/protobuf.js

@@ -623,7 +623,18 @@ protobuf.TextReader = class {
             }
             if (first && !whitespace) {
                 first = false;
-                if (c === '#' || c === '[') {
+                if (c === '#') {
+                    let c;
+                    do {
+                        c = decoder.decode();
+                    }
+                    while (c !== undefined && c !== '\n');
+                    if (c === undefined) {
+                        break;
+                    }
+                    continue;
+                }
+                if (c === '[') {
                     continue;
                 }
                 if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z') {