We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96942a2 commit 45c7141Copy full SHA for 45c7141
src/libc/strcspn.src
@@ -31,16 +31,15 @@ __strcspn_strpbrk_common:
31
ld c, a
32
cpir
33
sbc hl, hl
34
- scf
35
sbc hl, bc ; Always sets carry
36
ex (sp), hl
37
- pop iy ; IY = strlen(reject)
+ pop iy ; IY = strlen(reject) + 1
38
dec hl ; HL = reject - 1
39
push de
40
.loop:
41
ld a, (de) ; A = *str++
42
inc de
43
- lea bc, iy + 1 ; BC = strlen(reject) + 1
+ lea bc, iy ; BC = strlen(reject) + 1
44
add hl, bc ; HL = reject + strlen(reject)
45
cpdr ; Find A in reject, including null terminator
46
jr nz, .loop ; Loop if no match
0 commit comments