zint/backend
Schaich 609fbeb008 Pull addon_row_height out of the loop
The ```addon_row_height``` variable is conditionally initialized in some
branches, which also set ```addon_latch``` to one(true). Later in the loop's
body, ```addon_row_height``` is accessed if ```addon_latch``` is true.

Unlike ```addon_row_height```, ```addon_latch``` is defined outside of the
loop's body, and as it is never reset to zero, keeps it's value of one once
it has been assigned. Future iterations of the loop can therefore not branch
into the code that initializes ```addon_row_height``` and (re)assigns
```addon_latch```, and ```addon_latch``` will be true, which causes
```addon_row_height``` to be accessed without having been initialized.

On most platforms, the ```addon_row_height``` variable will always be
allocated on the same memory, while skipping the initialization causes
the value that was previously assigned to ```addon_row_height``` to
remain on that memory.

Pull the variable declaration out of the for loop's body to assure the
previous iteration's value remains there independend of compiler or
platform specific behaviour.
2021-11-23 20:04:56 +09:00
..
2017-08-27 09:31:02 +01:00
2017-10-25 17:23:57 +01:00
2017-10-25 17:23:57 +01:00
2017-10-25 17:23:57 +01:00
2021-11-11 13:30:58 +00:00
2021-11-11 13:30:58 +00:00
2017-10-25 17:23:57 +01:00
2021-11-11 13:30:58 +00:00
2021-11-23 20:04:56 +09:00
2021-08-14 16:11:25 +01:00