Commit 697cde4
authored
Error handling after increasing the array index
After increasing the array index, an error handling must be included, because if the input is extended later again, we can look for the error again. A handled error is easier to find and fix than a buffer overwrite error.
Table index should start from 0, because it indicates better that the table is empty.
Signed-off-by: Janos Varga <[email protected]>1 parent c924f44 commit 697cde4
File tree
1 file changed
+13
-4
lines changed- COBOL Programming Course #3 - Advanced Topics/Challenges/Debugging/cbl
1 file changed
+13
-4
lines changedLines changed: 13 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
139 | | - | |
| 140 | + | |
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
| |||
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
165 | 175 | | |
166 | 176 | | |
167 | 177 | | |
168 | 178 | | |
169 | | - | |
170 | 179 | | |
171 | 180 | | |
172 | 181 | | |
| |||
175 | 184 | | |
176 | 185 | | |
177 | 186 | | |
178 | | - | |
| 187 | + | |
179 | 188 | | |
180 | 189 | | |
181 | 190 | | |
| |||
0 commit comments