aboutsummaryrefslogtreecommitdiffstats
path: root/node.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2010-07-16 12:35:31 +0300
committerArnold D. Robbins <arnold@skeeve.com>2010-07-16 12:35:31 +0300
commit8ceb5f934787eb7be5fb452fb39179df66119954 (patch)
tree56a80fc5c118f7c2ebad7ab44bd8be048b2f7ec2 /node.c
parent2f83a4e72166e811a9f0b4726c19a3d5a0b17dcb (diff)
downloadegawk-8ceb5f934787eb7be5fb452fb39179df66119954.tar.gz
egawk-8ceb5f934787eb7be5fb452fb39179df66119954.tar.bz2
egawk-8ceb5f934787eb7be5fb452fb39179df66119954.zip
Move to gawk-2.15.6.
Diffstat (limited to 'node.c')
-rw-r--r--node.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/node.c b/node.c
index dca4ad19..f6134b5e 100644
--- a/node.c
+++ b/node.c
@@ -3,7 +3,7 @@
*/
/*
- * Copyright (C) 1986, 1988, 1989, 1991, 1992, 1993 the Free Software Foundation, Inc.
+ * Copyright (C) 1986, 1988, 1989, 1991-1995 the Free Software Foundation, Inc.
*
* This file is part of GAWK, the GNU implementation of the
* AWK Progamming Language.
@@ -127,7 +127,7 @@ register NODE *s;
#ifdef DEBUG
if (s == NULL) cant_happen();
if (s->type != Node_val) cant_happen();
- if (s->flags & STR) return s;
+ if ((s->flags & STR) && (s->stfmt == -1 || s->stfmt == CONVFMTidx)) return s;
if (!(s->flags & NUM)) cant_happen();
if (s->stref != 0) ; /*cant_happen();*/
#endif
@@ -441,6 +441,10 @@ char **string_ptr;
}
if (do_posix)
return ('x');
+ if (! isxdigit((*string_ptr)[1])) {
+ warning("no hex digits in \\x escape sequence");
+ return ('x');
+ }
i = 0;
while (1) {
if (isxdigit((c = *(*string_ptr)++))) {