From 7aa6d8818eaa79bc031081b64344c373247e7611 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Fri, 18 Oct 2019 18:33:47 -0500 Subject: hscript: Ensure errors are kept up to date --- hscript/script.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hscript') diff --git a/hscript/script.cc b/hscript/script.cc index 1cc6f5d..8a73704 100644 --- a/hscript/script.cc +++ b/hscript/script.cc @@ -205,6 +205,7 @@ struct Script::ScriptPrivate { } else if(key_name == "username") { if(accounts.size() >= 255) { + if(errors) *errors += 1; output_error("installfile:" + std::to_string(lineno), "username: too many users", "you may only specify 255 users"); @@ -223,6 +224,7 @@ struct Script::ScriptPrivate { #define GET_USER_DETAIL(OBJ, KEY) \ if(accounts.find(OBJ->username()) == accounts.end()) {\ + if(errors) *errors += 1;\ output_error("installfile:" + std::to_string(lineno),\ std::string(KEY) + ": account name " + OBJ->username() +\ " is unknown");\ -- cgit v1.2.3-60-g2f50