Fix formatting
This commit is contained in:
parent
d9b8904f88
commit
9a8feadff7
@ -188,12 +188,12 @@ void execute(Stack *stack, Stack *originstack, char *modname)
|
|||||||
|
|
||||||
if (!strcmp(NAME, "string"))
|
if (!strcmp(NAME, "string"))
|
||||||
{
|
{
|
||||||
for (char *i = ARG; *i != '\0'; i++)
|
for (char *i = ARG; *i != '\0'; i++)
|
||||||
stack_push(stack, *i);
|
stack_push(stack, *i);
|
||||||
|
|
||||||
stack_push(stack, strlen(ARG));
|
stack_push(stack, strlen(ARG));
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Math
|
// Math
|
||||||
@ -484,11 +484,11 @@ void execute(Stack *stack, Stack *originstack, char *modname)
|
|||||||
if (!strcmp(NAME, "call"))
|
if (!strcmp(NAME, "call"))
|
||||||
{
|
{
|
||||||
|
|
||||||
unsigned short len = stack_pop(stack);
|
unsigned short len = stack_pop(stack);
|
||||||
char *string = calloc(len, sizeof(char));
|
char *string = calloc(len, sizeof(char));
|
||||||
|
|
||||||
for (int i = len - 1; i != -1; i--)
|
for (int i = len - 1; i != -1; i--)
|
||||||
string[i] = stack_pop(stack);
|
string[i] = stack_pop(stack);
|
||||||
|
|
||||||
if (!strcmp(string, modname))
|
if (!strcmp(string, modname))
|
||||||
{
|
{
|
||||||
@ -517,7 +517,7 @@ void execute(Stack *stack, Stack *originstack, char *modname)
|
|||||||
stack_push(stack, tempstack->memory[i]);
|
stack_push(stack, tempstack->memory[i]);
|
||||||
|
|
||||||
free(tempstack);
|
free(tempstack);
|
||||||
free(string);
|
free(string);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user