summary refs log tree commit diff
path: root/Src/math.c
diff options
context:
space:
mode:
authorPeter Stephenson <p.stephenson@samsung.com>2020-06-22 12:06:43 +0100
committerPeter Stephenson <p.stephenson@samsung.com>2020-06-23 12:17:32 +0100
commitaf1c009c3ea97cb4ec79b54c8b208198230e3ffb (patch)
treec970cd9ebeacc2882516f27028ab20be9af65b7b /Src/math.c
parentae0129b49f9f1b624fb4b067f6f1ef6757a24fd2 (diff)
downloadzsh-af1c009c3ea97cb4ec79b54c8b208198230e3ffb.tar.gz
zsh-af1c009c3ea97cb4ec79b54c8b208198230e3ffb.tar.xz
zsh-af1c009c3ea97cb4ec79b54c8b208198230e3ffb.zip
46079: Ignore double quotes in math expressions.
Treat as white space.

This is required for compatibility and previously had no use in zsh
as it generated an error.
Diffstat (limited to 'Src/math.c')
-rw-r--r--Src/math.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Src/math.c b/Src/math.c
index 905b910ec..b57ba42d4 100644
--- a/Src/math.c
+++ b/Src/math.c
@@ -831,6 +831,8 @@ zzlex(void)
 	case ' ': /* Fall through! */
 	case '\t':
 	case '\n':
+	case '"': /* POSIX says ignore these */
+	case Dnull:
 	    break;
 	default:
 	    if (idigit(*--ptr) || *ptr == '.')