]> git.kaiwu.me - njs.git/commit
Fixed pre/post increment/decrement in assignment operations.
authorAlexander Borisov <alexander.borisov@nginx.com>
Thu, 23 Jul 2020 10:24:10 +0000 (13:24 +0300)
committerAlexander Borisov <alexander.borisov@nginx.com>
Thu, 23 Jul 2020 10:24:10 +0000 (13:24 +0300)
commit7d83989f613e8150ca204fd68977ac6c802b0918
treefaeddf8e818cbe167232017ae808b37cb3b54cd7
parent50ea0dbc4209686fd22a0c0d052ff31f0410c608
Fixed pre/post increment/decrement in assignment operations.

Previously, the compound assignment operations did not create temporary
index for increments/decrements in the generator. The result was that
the increment/decrement changed the value immediately in place, which
led to incorrect calculations.

The fix is to use a separate temporary index for increments/decrements in
assignment operations.

This closes #271 issue on GitHub.
src/njs_generator.c
src/njs_lexer.h
src/test/njs_unit_test.c