diff --git a/legacy/embryo/examples/test.sma b/legacy/embryo/examples/test.sma index 2bd4e766b5..06853dbc4c 100644 --- a/legacy/embryo/examples/test.sma +++ b/legacy/embryo/examples/test.sma @@ -106,6 +106,8 @@ main() native_rec(1, "Smelly", 77); printf("native_rec() done\n"); + printf("atoi(\"7\") = %i\n", atoi("7")); + return 7; } diff --git a/legacy/embryo/src/lib/embryo_str.c b/legacy/embryo/src/lib/embryo_str.c index 2f460f3ab7..d98adefe12 100644 --- a/legacy/embryo/src/lib/embryo_str.c +++ b/legacy/embryo/src/lib/embryo_str.c @@ -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);