From 66b2d18243d055bcbc6c3f7708960575d02db09c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 16 Jun 2014 10:05:09 -0400 Subject: [PATCH] Don't parse 'var == expr' as an assignment --- nix-repl.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nix-repl.cc b/nix-repl.cc index 8049008d1..ea188a1c7 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));