]> ocean-lang.org Git - ocean/blobdiff - csrc/parsergen.mdc
parsergen: fix bug testing return value for shift()
[ocean] / csrc / parsergen.mdc
index 5d5ea1ebc352b13eacfd809a11416ce1ba2e5e18..2c2e2a66dba6a90035a0d7584537bc0c0f978c5a 100644 (file)
@@ -2408,7 +2408,7 @@ We return whatever `asn` was returned by reducing production zero.
                         * Then we discard input tokens until
                         * we find one that is acceptable.
                         */
-                       while (shift(&p, TK_error, tk, states) < 0
+                       while (shift(&p, TK_error, tk, states) == 0
                               && p.tos > 0)
                                // discard this state
                                pop(&p, 1, do_free);