From 9b74687384cbb4d20341da1189f204e53cb5dc68 Mon Sep 17 00:00:00 2001 From: liljencrantz Date: Sat, 6 Oct 2007 20:54:53 +1000 Subject: [PATCH] Minor new sanity test in reader darcs-hash:20071006105453-75c98-3f5d1a0a175a7b810f68b38dec472bb697081742.gz --- reader.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/reader.c b/reader.c index 75f5be9b9..d6ac49db2 100644 --- a/reader.c +++ b/reader.c @@ -1530,10 +1530,15 @@ void reader_sanity_check() { if( is_interactive) { + if( !data ) + sanity_lose(); + if(!( data->buff_pos <= data->buff_len )) sanity_lose(); + if(!( data->buff_len == wcslen( data->buff ) )) sanity_lose(); + } }