-
-
Notifications
You must be signed in to change notification settings - Fork 134
Commit a675d5a
committed
Fix String::compareTo(const char*) for invalid strings
When comparing an invalid String object to a non-empty char*, this would
erronously return 0 (equal) because of a typo.
This bug also masked three incorrect checks in related testcases. In two
cases, a String was made invalid and then checked to still contain a
value (these were changed to check that the string is invalid) and in
one case the wrong string was checked.1 parent f7311d9 commit a675d5a
File tree
3 files changed
+13
-5
lines changed- api
- test/src/String
3 files changed
+13
-5
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
462 | 462 |
| |
463 | 463 |
| |
464 | 464 |
| |
465 | - | ||
465 | + | ||
466 | 466 |
| |
467 | 467 |
| |
468 | 468 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
127 | 127 |
| |
128 | 128 |
| |
129 | 129 |
| |
130 | - | ||
130 | + | ||
131 | 131 |
| |
132 | 132 |
| |
133 | 133 |
| |
| |||
158 | 158 |
| |
159 | 159 |
| |
160 | 160 |
| |
161 | - | ||
161 | + | ||
162 | 162 |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
121 | 121 |
| |
122 | 122 |
| |
123 | 123 |
| |
124 | - | ||
124 | + | ||
125 | 125 |
| |
126 | 126 |
| |
127 | 127 |
| |
128 | 128 |
| |
129 | - | ||
129 | + | ||
130 | + | ||
131 | + | ||
132 | + | ||
133 | + | ||
134 | + | ||
135 | + | ||
136 | + | ||
137 | + | ||
130 | 138 |
| |
131 | 139 |
| |
132 | 140 |
| |
|
0 commit comments