diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-18 18:33:47 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-18 18:33:47 -0500 |
commit | 7aa6d8818eaa79bc031081b64344c373247e7611 (patch) | |
tree | 7492ad52d9cbe7c9e3d43377698c5377a5ecb9bc /hscript | |
parent | 799b2fc3939bf4e30ed404a67aa7697ae352f5fe (diff) | |
download | horizon-7aa6d8818eaa79bc031081b64344c373247e7611.tar.gz horizon-7aa6d8818eaa79bc031081b64344c373247e7611.tar.bz2 horizon-7aa6d8818eaa79bc031081b64344c373247e7611.tar.xz horizon-7aa6d8818eaa79bc031081b64344c373247e7611.zip |
hscript: Ensure errors are kept up to date
Diffstat (limited to 'hscript')
-rw-r--r-- | hscript/script.cc | 2 |
1 files changed, 2 insertions, 0 deletions
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");\ |