aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil Hodgson <nyamatongwe@gmail.com>2018-09-18 12:58:40 +1000
committerNeil Hodgson <nyamatongwe@gmail.com>2018-09-18 12:58:40 +1000
commit951d567659000925cbeaf03dbe6b9efc75802cac (patch)
treee5c82e862a3312fb4b5b95566c076d0730794578
parentb2839a775547e090705689694d387097b1930db8 (diff)
downloadscintilla-mirror-951d567659000925cbeaf03dbe6b9efc75802cac.tar.gz
Initialize variables to ensure no undefined behaviour.
-rw-r--r--lexers/LexFortran.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/lexers/LexFortran.cxx b/lexers/LexFortran.cxx
index 3adee5839..28298b3ed 100644
--- a/lexers/LexFortran.cxx
+++ b/lexers/LexFortran.cxx
@@ -481,11 +481,11 @@ static void FoldFortranDoc(Sci_PositionU startPos, Sci_Position length, int init
int levelDeltaNext = 0;
const unsigned int nComL = 3; // defines how many comment lines should be before they are folded
- Sci_Position nComColB[nComL];
+ Sci_Position nComColB[nComL] = {};
Sci_Position nComColF[nComL] = {};
- Sci_Position nComCur;
- bool comLineB[nComL];
- bool comLineF[nComL];
+ Sci_Position nComCur = 0;
+ bool comLineB[nComL] = {};
+ bool comLineF[nComL] = {};
bool comLineCur;
Sci_Position nLineTotal = styler.GetLine(styler.Length()-1) + 1;
if (foldComment) {