Skip to content
Snippets Groups Projects
Commit 90902362 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Calendar.Timezone: Make compile() reentrant.

Each time compile() was called an additional set of rules
was appended. This could be triggered when a zone had
compilation errors.

Also fixes issue with throwing broken errors from compile().
parent 87f2e9c6
No related branches found
No related tags found
No related merge requests found
......@@ -1186,6 +1186,7 @@ class Runtime_timezone_compiler
float t1=time(t);
#endif
rules = ({});
foreach(lines, string line) add(line);
string c=dump();
......@@ -1206,7 +1207,7 @@ class Runtime_timezone_compiler
{
int i=0;
foreach (c/"\n",string line) write("%2d: %s\n",++i,line);
error(err);
throw(err);
}
object zo=p();
if (zo->thezone) zo=zo->thezone;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment