From 19d1017c6dd36592f9422e79a9c47cce2e80cd58 Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 29 Mar 2005 13:43:53 +0000 Subject: First fix for [rand]. More later as there is an evident bias due to some programming error probably. --- jim.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'jim.c') diff --git a/jim.c b/jim.c index 67f4bdd..f632177 100644 --- a/jim.c +++ b/jim.c @@ -2,7 +2,7 @@ * Copyright 2005 Salvatore Sanfilippo * Copyright 2005 Clemens Hintze * - * $Id: jim.c,v 1.133 2005/03/29 13:38:04 antirez Exp $ + * $Id: jim.c,v 1.134 2005/03/29 13:43:53 antirez Exp $ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -10879,7 +10879,7 @@ static int Jim_RandCoreCommand(Jim_Interp *interp, int argc, Jim_GetWide(interp, argv[2], &max) != JIM_OK) return JIM_ERR; } - len = max-min-1; + len = max-min; if (len < 0) { Jim_SetResultString(interp, "Invalid arguments (max < min)", -1); return JIM_ERR; @@ -11027,7 +11027,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.133 2005/03/29 13:38:04 antirez Exp $\n"); + printf("CVS ID: $Id: jim.c,v 1.134 2005/03/29 13:43:53 antirez Exp $\n"); Jim_SetVariableStrWithStr(interp, "jim_interactive", "1"); while (1) { char buf[1024]; -- cgit v1.1