diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-11-05 09:42:16 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-11-05 09:42:16 +0000 |
commit | d7731f785f41df24cd7db7bb1c8bf5c0a8905d70 (patch) | |
tree | 87161305a8119c678b675eca5662be38d25c8df7 /gnu | |
parent | a6085c3d3bb25a048cf19f67e3b551cf99bfe706 (diff) |
interpret the following as " 040" and not as " "; augustss@cs.chalmers.se
.ascii "\040040"
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/gas/read.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gnu/usr.bin/gas/read.c b/gnu/usr.bin/gas/read.c index 2d869de6b87..e7407fc3797 100644 --- a/gnu/usr.bin/gas/read.c +++ b/gnu/usr.bin/gas/read.c @@ -1,4 +1,4 @@ -/* $OpenBSD: read.c,v 1.3 1996/12/21 21:50:55 tholo Exp $ */ +/* $OpenBSD: read.c,v 1.4 1997/11/05 09:42:15 deraadt Exp $ */ /* read.c - read a source file - @@ -21,7 +21,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef lint -static char rcsid[] = "$OpenBSD: read.c,v 1.3 1996/12/21 21:50:55 tholo Exp $"; +static char rcsid[] = "$OpenBSD: read.c,v 1.4 1997/11/05 09:42:15 deraadt Exp $"; #endif #define MASK_CHAR (0xFF) /* If your chars aren't 8 bits, you will @@ -2086,8 +2086,11 @@ unsigned int next_char_of_string() { case '8': case '9': { long number; - - for (number = 0; isdigit(c); c = *input_line_pointer++) { + int nchar; + + for (nchar = 0, number = 0; + nchar < 3 && isdigit(c); + c = *input_line_pointer++, nchar++) { number = number * 8 + c - '0'; } c = number & 0xff; |