Position -1 is the last character of a string

Position 0 is invalid, which matches with STRIN/STRRIN
returning 0 on failure.
This commit is contained in:
Rangi
2021-04-19 12:09:32 -04:00
committed by Eldred Habert
parent dc5b7802c8
commit cf2bbe6435
6 changed files with 29 additions and 26 deletions

View File

@@ -1,18 +1,20 @@
warning: strsub.asm(15) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Position 5 is past the end of the string
warning: strsub.asm(14) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Position starts at 1
warning: strsub.asm(16) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Position starts at 1
warning: strsub.asm(19) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Length too big: 32
warning: strsub.asm(20) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Length too big: 300
warning: strsub.asm(21) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Position starts at 1
warning: strsub.asm(21) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Length too big: 300
warning: strsub.asm(23) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Position 5 is past the end of the string
warning: strsub.asm(17) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Position starts at 1
warning: strsub.asm(20) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Length too big: 32
warning: strsub.asm(21) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Length too big: 300
warning: strsub.asm(22) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Position starts at 1
warning: strsub.asm(22) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Length too big: 300
warning: strsub.asm(24) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Position 5 is past the end of the string
warning: strsub.asm(25) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Length too big: 1
warning: strsub.asm(27) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
warning: strsub.asm(28) -> strsub.asm::xstrsub(4): [-Wbuiltin-args]
STRSUB: Length too big: 10