From beea7ce25cfe42c363259705a6b5741ad47484ab Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 22 Oct 2016 04:04:46 -0700 Subject: 3543 --- html/089scenario_filesystem.cc.html | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'html/089scenario_filesystem.cc.html') diff --git a/html/089scenario_filesystem.cc.html b/html/089scenario_filesystem.cc.html index 8d42226c..7fa10101 100644 --- a/html/089scenario_filesystem.cc.html +++ b/html/089scenario_filesystem.cc.html @@ -19,7 +19,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .Special { color: #c00000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } --> @@ -149,6 +149,11 @@ put(Recipe_ordinal,(in); if (!has_data(in)) break; string filename = next_word(in); + if (filename.empty()) { + assert(!has_data(in)); + raise << "incomplete 'resources' block at end of file (0)\n" << end(); + return; + } if (*filename.begin() != '[') { raise << caller << ": assume-resources: filename '" << filename << "' must begin with a '['\n" << end(); break; @@ -164,6 +169,11 @@ put(Recipe_ordinal,break; } string arrow = next_word(in); + if (arrow.empty()) { + assert(!has_data(in)); + raise << "incomplete 'resources' block at end of file (1)\n" << end(); + return; + } if (arrow != "<-") { raise << caller << ": assume-resources: expected '<-' after filename '" << filename << "' but got '" << arrow << "'\n" << end(); break; @@ -173,6 +183,11 @@ put(Recipe_ordinal,break; } string contents = next_word(in); + if (contents.empty()) { + assert(!has_data(in)); + raise << "incomplete 'resources' block at end of file (2)\n" << end(); + return; + } if (*contents.begin() != '[') { raise << caller << ": assume-resources: file contents '" << contents << "' for filename '" << filename << "' must begin with a '['\n" << end(); break; -- cgit 1.4.1-2-gfad0