From 1385411e30f3ac10cc67e3478fd6e65d1965506e Mon Sep 17 00:00:00 2001 From: helly Date: Sat, 31 Dec 2005 00:56:39 +0000 Subject: [PATCH] - Add error message if 'indent' below zero --- bootstrap/scanner.cc | 6 +++++- scanner.re | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/bootstrap/scanner.cc b/bootstrap/scanner.cc index 782eab3e..bf8cc3d0 100644 --- a/bootstrap/scanner.cc +++ b/bootstrap/scanner.cc @@ -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 @@ -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; } diff --git a/scanner.re b/scanner.re index c9cbdb1f..6adb0149 100644 --- a/scanner.re +++ b/scanner.re @@ -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; } -- 2.40.0