Commit 2aeff37
committed
Replace overflowing sub with checked_sub.
In the case when a no-break-space \u{a0} exists before any non
white space characters an error is generated that points into
the white space. When the terminal width is also too small a
subtraction is triggered here that would overflow. That
subtraction implicitly assumed that no errors occur in the
white space. This commit replaces that subtraction with an
explicitly checked one to avoid this overflow.1 parent c26db43 commit 2aeff37
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
144 | 151 | | |
145 | 152 | | |
146 | 153 | | |
| |||
0 commit comments