c07b972046
screwing with stuff at str[strlen(str)-1].
14 lines
495 B
Diff
14 lines
495 B
Diff
--- yasm-0.4.0/modules/preprocs/nasm/genmacro.c~ 2004-10-31 03:55:54.000000000 +0000
|
|
+++ yasm-0.4.0/modules/preprocs/nasm/genmacro.c 2005-02-14 09:21:37.000000000 +0000
|
|
@@ -102,8 +102,8 @@
|
|
while (*strp == ' ' || *strp == '\t')
|
|
strp++;
|
|
len = strlen(strp);
|
|
- while (strp[len-1] == ' ' || strp[len-1] == '\t' ||
|
|
- strp[len-1] == '\n') {
|
|
+ while (len && (strp[len-1] == ' ' || strp[len-1] == '\t' ||
|
|
+ strp[len-1] == '\n')) {
|
|
strp[len-1] = '\0';
|
|
len--;
|
|
}
|