Commit e82abdb
buffer: allow to write zero bytes
Encoder can try to write zero bytes sometimes. For example, when
it encodes an empty string. Let's simply handle this case in buffer
and iterators instead of assertion.
Along the way, replace the assertion in `iterator::get` method as well.
It should have be done in 28bae01, but we forgot about this method
because it's not used by decoder.1 parent 394aa89 commit e82abdb
3 files changed
+34
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
703 | 703 | | |
704 | 704 | | |
705 | 705 | | |
706 | | - | |
| 706 | + | |
| 707 | + | |
707 | 708 | | |
708 | 709 | | |
709 | 710 | | |
| |||
1105 | 1106 | | |
1106 | 1107 | | |
1107 | 1108 | | |
1108 | | - | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
1109 | 1112 | | |
1110 | 1113 | | |
1111 | 1114 | | |
| |||
1160 | 1163 | | |
1161 | 1164 | | |
1162 | 1165 | | |
1163 | | - | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
1164 | 1169 | | |
1165 | 1170 | | |
1166 | 1171 | | |
| |||
1216 | 1221 | | |
1217 | 1222 | | |
1218 | 1223 | | |
1219 | | - | |
| 1224 | + | |
| 1225 | + | |
1220 | 1226 | | |
1221 | 1227 | | |
1222 | 1228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
128 | 134 | | |
129 | 135 | | |
130 | 136 | | |
| |||
378 | 384 | | |
379 | 385 | | |
380 | 386 | | |
381 | | - | |
382 | 387 | | |
383 | 388 | | |
384 | 389 | | |
385 | 390 | | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
386 | 405 | | |
387 | 406 | | |
388 | 407 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| 233 | + | |
233 | 234 | | |
234 | 235 | | |
235 | 236 | | |
| |||
322 | 323 | | |
323 | 324 | | |
324 | 325 | | |
325 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
326 | 329 | | |
327 | 330 | | |
328 | 331 | | |
| |||
0 commit comments