about summary refs log tree commit diff
diff options
context:
space:
mode:
-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));