atoi booboo - accepts 1, not 2 params! :)

SVN revision: 12824
This commit is contained in:
Carsten Haitzler 2005-01-08 08:57:00 +00:00
parent be4cf07d8a
commit f505f667cd
2 changed files with 3 additions and 1 deletions

View File

@ -106,6 +106,8 @@ main()
native_rec(1, "Smelly", 77);
printf("native_rec() done\n");
printf("atoi(\"7\") = %i\n", atoi("7"));
return 7;
}

View File

@ -24,7 +24,7 @@ _embryo_str_atoi(Embryo_Program *ep, Embryo_Cell *params)
char *s1;
/* params[1] = str */
if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
if (params[0] != (1 * sizeof(Embryo_Cell))) return 0;
STRGET(ep, s1, params[1]);
if (!s1) return 0;
return (Embryo_Cell)atoi(s1);