forked from starnakin/IronGOLEM
strlen: check if the str == NULL
This commit is contained in:
parent
0c782738cc
commit
a39e4a780d
@ -1,6 +1,8 @@
|
|||||||
strlen(str) {
|
strlen(str) {
|
||||||
local i = 0;
|
local i = 0;
|
||||||
|
|
||||||
|
if (str == NULL)
|
||||||
|
return 0;
|
||||||
loop {
|
loop {
|
||||||
if ([str + i] == 0)
|
if ([str + i] == 0)
|
||||||
return (i);
|
return (i);
|
||||||
|
Loading…
Reference in New Issue
Block a user