]> granicus.if.org Git - re2c/commitdiff
- Add error message if 'indent' below zero
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sat, 31 Dec 2005 00:56:39 +0000 (00:56 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sat, 31 Dec 2005 00:56:39 +0000 (00:56 +0000)
bootstrap/scanner.cc
scanner.re

index 782eab3eb1e953ac4f35092bc9a7e1dfb4c48137..bf8cc3d00e970047316117e1fd8f0c148959180d 100644 (file)
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.10.0.dev on Sat Dec 31 00:57:11 2005 */
+/* Generated by re2c 0.10.0.dev on Sat Dec 31 01:50:50 2005 */
 #line 1 "scanner.re"
 /* $Id$ */
 #include <stdlib.h>
@@ -1307,6 +1307,10 @@ void Scanner::config(const Str* cfg, int num)
 {
        if (cfg->to_string() == "indent")
        {
+               if (num < 0)
+               {
+                       fatal("configuration 'indent' must be a positive integer");
+               }
                topIndent = num;
                return;
        }
index c9cbdb1fffa74b5479eccd7846ef0228375acca9..6adb0149e0ad2e6769ef57d67ad9f4a05fd05a44 100644 (file)
@@ -315,6 +315,10 @@ void Scanner::config(const Str* cfg, int num)
 {
        if (cfg->to_string() == "indent")
        {
+               if (num < 0)
+               {
+                       fatal("configuration 'indent' must be a positive integer");
+               }
                topIndent = num;
                return;
        }