From d4d5b59bcad45150c5e4c8a6ee88282a1efb88da Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 30 Jan 2023 18:08:49 +0100 Subject: [PATCH] Fix operator order in math procedures. --- aocla.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aocla.c b/aocla.c index 86fddda..d9e2404 100644 --- a/aocla.c +++ b/aocla.c @@ -30,7 +30,7 @@ typedef struct obj { int line; /* Source code line number where this was defined, or 0. */ union { int i; /* Integer. Literal: 1234 */ - int istrue; /* Boolean. */ + int istrue; /* Boolean. Literal: #t or #f */ struct { /* List or Tuple: Literal: [1 2 3 4] or (a b c) */ struct obj **ele; size_t len; @@ -776,8 +776,8 @@ int addProcString(aoclactx *ctx, const char *name, const char *prog) { /* Implements +, -, *, %, ... */ int procBasicMath(aoclactx *ctx) { if (checkStackType(ctx,2,OBJ_TYPE_INT,OBJ_TYPE_INT)) return 1; - obj *a = stackPop(ctx); obj *b = stackPop(ctx); + obj *a = stackPop(ctx); int res; const char *fname = ctx->frame->curproc->name;