From 7b527408126d910d78a03fa6c9bffa3077d36b5e Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 22 Mar 2005 14:32:50 +0000 Subject: Fix for short circuit in expr. --- jim.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'jim.c') diff --git a/jim.c b/jim.c index 40dd0a2..bcbc86b 100644 --- a/jim.c +++ b/jim.c @@ -2,7 +2,7 @@ * Copyright 2005 Salvatore Sanfilippo * Copyright 2005 Clemens Hintze * - * $Id: jim.c,v 1.126 2005/03/22 12:47:41 antirez Exp $ + * $Id: jim.c,v 1.127 2005/03/22 14:32:50 antirez Exp $ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -6114,7 +6114,7 @@ static void ExprMakeLazy(Jim_Interp *interp, ExprByteCode *expr) sizeof(Jim_Obj*)*(expr->len-leftindex)); expr->len += 2; index += 2; - offset = index-leftindex; + offset = (index-leftindex)-1; Jim_DecrRefCount(interp, expr->obj[index]); if (expr->opcode[index] == JIM_EXPROP_LOGICAND) { expr->opcode[leftindex+1] = JIM_EXPROP_LOGICAND_LEFT; @@ -10876,7 +10876,7 @@ int Jim_InteractivePrompt(Jim_Interp *interp) printf("Welcome to Jim version %d.%d, " "Copyright (c) 2005 Salvatore Sanfilippo\n", JIM_VERSION / 100, JIM_VERSION % 100); - printf("CVS ID: $Id: jim.c,v 1.126 2005/03/22 12:47:41 antirez Exp $\n"); + printf("CVS ID: $Id: jim.c,v 1.127 2005/03/22 14:32:50 antirez Exp $\n"); Jim_SetVariableStrWithStr(interp, "jim_interactive", "1"); while (1) { char buf[1024]; -- cgit v1.1