diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-10-04 12:02:54 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-10-04 12:05:28 +0100 |
commit | 76b31aa76ac3b29f3c41bc6ac72d6be524170ff3 (patch) | |
tree | 32c3443a5d352b878b0c7f5dc64d14af1769e71d /templatelayout.h | |
parent | 769365b4db6b1beeeb1e86d106cf2ffead975747 (diff) | |
download | subsurface-76b31aa76ac3b29f3c41bc6ac72d6be524170ff3.tar.gz |
Don't use the same variable name for loop and temp storage
Oops. Moving the check to the beginning of the function in order to avoid
partial execution in commit 69036a1bb777 ("Avoid resource leak by bailing
early") had a nasty side effect. Since Linus used 'i' both to hold the
dive number and as a loop variable, by moving this to the top of the
function the dive nr was overwritten which caused all kinds of problems.
My bad - but of course you shouldn't mix loop variables with meaningful
variables, either...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'templatelayout.h')
0 files changed, 0 insertions, 0 deletions