vi/v_txt.c: txt_dent: introduce sequence point between decrement and accessmaster
commit864873d3f353ab3e54040817ec562bd3b346b55f
authorSven Verdoolaege <sven.verdoolaege@gmail.com>
Tue, 15 Sep 2020 21:08:38 +0000 (15 23:08 +0200)
committerSven Verdoolaege <sven.verdoolaege@gmail.com>
Tue, 15 Sep 2020 21:08:38 +0000 (15 23:08 +0200)
treea501068ff0b75af5aa899bc01161e63c54503790
parent4d6fa5ff6b23757ecf14e18ec4dc3285472346d3
vi/v_txt.c: txt_dent: introduce sequence point between decrement and access

In particular, ensure the decrement is performed
before the modulo is subtracted from "target".
Although most, if not all, compilers will perform
the decrement first even in the original code,
this is not guaranteed by the C language.

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>
vi/v_txt.c