From c334832bb4a716c27e73dbe389e7a169f549e542 Mon Sep 17 00:00:00 2001 From: Chris Angelico <rosuav@gmail.com> Date: Sat, 14 Oct 2017 06:33:06 +1100 Subject: [PATCH] Support precompilation with Pike 8.1 --- lib/modules/Tools.pmod/Standalone.pmod/precompile.pike | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/modules/Tools.pmod/Standalone.pmod/precompile.pike b/lib/modules/Tools.pmod/Standalone.pmod/precompile.pike index b1080cf965..40760f3b64 100644 --- a/lib/modules/Tools.pmod/Standalone.pmod/precompile.pike +++ b/lib/modules/Tools.pmod/Standalone.pmod/precompile.pike @@ -1120,7 +1120,12 @@ class PikeType if (sizeof(tmp) == 1) { int bits; /* Support the string(Xbit) syntax too. */ - if ((sizeof(q) == 4) && ((string)q[2] == "bit") && + if (sizeof(q) == 3 && sscanf((string)q[1], "%dbit", bits)) + { + low = "0"; + high = sprintf("%d", (1 << bits) - 1); + } + else if ((sizeof(q) == 4) && ((string)q[2] == "bit") && ((bits = (int)(string)q[1]) > 0)) { low = "0"; high = sprintf("%d", (1 << bits) - 1); -- GitLab