about summary refs log tree commit diff
path: root/Src/math.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-03-01 10:08:02 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-03-01 10:08:02 +0000
commit137c94144cb236363f7af4ac86801fefde96d495 (patch)
treea77b839d007d26fb46f182957273a25ad4998569 /Src/math.c
parent76d90bd5649c6e0bf02f94d8fe75a7a94ae95b20 (diff)
downloadzsh-137c94144cb236363f7af4ac86801fefde96d495.tar.gz
zsh-137c94144cb236363f7af4ac86801fefde96d495.tar.xz
zsh-137c94144cb236363f7af4ac86801fefde96d495.zip
zsh-workers/9947
Diffstat (limited to 'Src/math.c')
-rw-r--r--Src/math.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/Src/math.c b/Src/math.c
index a3609d429..ce685e2db 100644
--- a/Src/math.c
+++ b/Src/math.c
@@ -396,7 +396,7 @@ zzlex(void)
 	    }
 	    if (iident(*ptr)) {
 		int func = 0;
-		char *p, q;
+		char *p;
 
 		p = ptr;
 		while (iident(*++ptr));
@@ -413,10 +413,7 @@ zzlex(void)
 			    ptr++;
 		    }
 		}
-		q = *ptr;
-		*ptr = '\0';
-		yylval = dupstring(p);
-		*ptr = q;
+		yylval = dupstrpfx(p, ptr - p);
 		return (func ? FUNC : (cct ? CID : ID));
 	    }
 	    else if (cct) {