ex/ex_txt.c: txt_dent: introduce sequence point between decrement and access
commit4d6fa5ff6b23757ecf14e18ec4dc3285472346d3
authorSven Verdoolaege <sven.verdoolaege@gmail.com>
Tue, 15 Sep 2020 21:03:59 +0000 (15 23:03 +0200)
committerSven Verdoolaege <sven.verdoolaege@gmail.com>
Tue, 15 Sep 2020 21:03:59 +0000 (15 23:03 +0200)
treecd379b7e79d70e9f33d4239fa6cea13d9861e962
parentf462fedd26f78eec1998da4b9cba360095a6aa53
ex/ex_txt.c: txt_dent: introduce sequence point between decrement and access

In particular, ensure the decrement is performed
before the modulo is subtracted from "scno".
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>
ex/ex_txt.c