From 7c46b174e37cbee705e3f3af46cf03ff057531db Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 22 Apr 2001 20:07:31 +0000 Subject: (cmd_pmem_) seg fault when freeing (changed) arg valued corrected --- mixlib/mix_vm_command.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mixlib/mix_vm_command.c b/mixlib/mix_vm_command.c index aab6e3a..af9a52e 100644 --- a/mixlib/mix_vm_command.c +++ b/mixlib/mix_vm_command.c @@ -1,7 +1,7 @@ /* -*-c-*- -------------- mix_vm_command.c : * Implementation of the functions declared in mix_vm_command.h * ------------------------------------------------------------------ - * Last change: Time-stamp: "01/04/01 15:16:18 jose" + * Last change: Time-stamp: "2001-04-22 17:20:07 jao" * ------------------------------------------------------------------ * Copyright (C) 2001 Free Software Foundation, Inc. * @@ -709,18 +709,19 @@ cmd_pmem_ (mix_vm_cmd_dispatcher_t *dis, const gchar *carg) begin = end = atol (arg); else if (arg[i] == '-') { + gchar *narg; arg[i++] = '\0'; begin = atol (arg); - arg = arg + i; + narg = arg + i; i = 0; - while (isdigit (arg[i])) + while (isdigit (narg[i])) i++; - while (isspace (arg[i])) + while (isspace (narg[i])) i++; - if (arg[i] != '\0') + if (narg[i] != '\0') error = TRUE; else - end = atol (arg); + end = atol (narg); } else error = TRUE; -- cgit v1.2.3