Commit ca79981
authored
instr(), in_wstr() and in_wchstr() clamped the count to 2047 and silently
truncated a longer line, which a pad can have. A window read cannot return
more than the columns left on the line, in the unit each method counts: cells,
characters, or bytes at CCHARW_MAX characters of MB_CUR_MAX bytes per cell.
Cap the count by that, and read the rest of the line when the count is
omitted, which it now can be.
getstr() and get_wstr() read the keyboard rather than the window, so their
limit stays.
1 parent 2c47c65 commit ca79981
5 files changed
Lines changed: 208 additions & 110 deletions
File tree
- Doc/library
- Lib/test
- Misc/NEWS.d/next/Library
- Modules
- clinic
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1404 | 1404 | | |
1405 | 1405 | | |
1406 | 1406 | | |
1407 | | - | |
| 1407 | + | |
| 1408 | + | |
1408 | 1409 | | |
1409 | 1410 | | |
1410 | 1411 | | |
1411 | | - | |
1412 | 1412 | | |
1413 | 1413 | | |
1414 | 1414 | | |
1415 | 1415 | | |
1416 | 1416 | | |
1417 | 1417 | | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
1418 | 1421 | | |
1419 | 1422 | | |
1420 | 1423 | | |
1421 | 1424 | | |
1422 | | - | |
| 1425 | + | |
| 1426 | + | |
1423 | 1427 | | |
1424 | 1428 | | |
1425 | 1429 | | |
1426 | | - | |
1427 | 1430 | | |
1428 | 1431 | | |
1429 | 1432 | | |
| |||
1433 | 1436 | | |
1434 | 1437 | | |
1435 | 1438 | | |
1436 | | - | |
| 1439 | + | |
| 1440 | + | |
1437 | 1441 | | |
1438 | 1442 | | |
1439 | 1443 | | |
1440 | 1444 | | |
1441 | | - | |
1442 | 1445 | | |
1443 | 1446 | | |
1444 | 1447 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
672 | 672 | | |
673 | 673 | | |
674 | 674 | | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
675 | 680 | | |
676 | 681 | | |
677 | 682 | | |
| |||
871 | 876 | | |
872 | 877 | | |
873 | 878 | | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
874 | 884 | | |
875 | 885 | | |
876 | 886 | | |
| |||
1188 | 1198 | | |
1189 | 1199 | | |
1190 | 1200 | | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
1191 | 1205 | | |
1192 | 1206 | | |
| 1207 | + | |
1193 | 1208 | | |
1194 | 1209 | | |
1195 | 1210 | | |
| |||
1206 | 1221 | | |
1207 | 1222 | | |
1208 | 1223 | | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
1209 | 1243 | | |
1210 | 1244 | | |
1211 | 1245 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments