about summary refs log tree commit diff
path: root/nix-repl.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-06-16T14·05-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-06-16T14·05-0400
commit66b2d18243d055bcbc6c3f7708960575d02db09c (patch)
tree8298cd5ac31c9c9666e23c7012b1204b39e93938 /nix-repl.cc
parent1734e8a1491ef831c83c2620b6b0f4a590b67c1f (diff)
Don't parse 'var == expr' as an assignment
Diffstat (limited to 'nix-repl.cc')
-rw-r--r--nix-repl.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/nix-repl.cc b/nix-repl.cc
index 8049008d14eb..ea188a1c75e5 100644
--- a/nix-repl.cc
+++ b/nix-repl.cc
@@ -350,6 +350,8 @@ bool NixRepl::processLine(string line)
         size_t p = line.find('=');
         string name;
         if (p != string::npos &&
+            p < line.size() &&
+            line[p + 1] != '=' &&
             isVarName(name = removeWhitespace(string(line, 0, p))))
         {
             Expr * e = parseString(string(line, p + 1));