Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8c565ab

Browse files
fix strstr
1 parent 8f5ec3d commit 8c565ab

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

‎0x09-libasm/102-strcasecmp.asm‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ end2:
4545

4646
cmpr15b,r14b ; (c1 != c2)
4747
jne loopend
48-
cmp[rsi], byte 0 ; (!c1)
48+
cmpr15b, byte 0 ; (!c1)
4949
je eq
5050
jmp loop_str
5151
loopend:

‎0x09-libasm/main/102-main.c‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
#define S2 "HOLBERTON SCHOOL"
1010
#define S3 "Holberton SchooL"
1111
#define S4 "holberton socool"
12-
12+
#define S5 "H"
13+
#define S6 "0円"
1314
/**
1415
* main - Program entry point
1516
*
@@ -21,6 +22,13 @@ int main(void)
2122
assert(strcasecmp(S1, S2) == asm_strcasecmp(S1, S2));
2223
assert(strcasecmp(S1, S3) == asm_strcasecmp(S1, S3));
2324
assert(strcasecmp(S1, S4) == asm_strcasecmp(S1, S4));
25+
assert(strcasecmp(S1, S5) == asm_strcasecmp(S1, S5));
26+
assert(strcasecmp(S1, S6) == asm_strcasecmp(S1, S6));
27+
assert(strcasecmp(S5, S1) == asm_strcasecmp(S5, S1));
28+
assert(strcasecmp(S6, S1) == asm_strcasecmp(S6, S1));
29+
assert(strcasecmp(S6, S6) == asm_strcasecmp(S6, S6));
30+
assert(strcasecmp(S1, S1) == asm_strcasecmp(S1, S1));
31+
assert(strcasecmp(S1, S5) == asm_strcasecmp(S1, S5));
2432

2533
printf("All good!\n");
2634
return (EXIT_SUCCESS);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /