# HG changeset patch
# User Oleg Oshmyan <chortos@inbox.lv>
# Date 1309299993 -10800
# Node ID 760d38ee86d63ba0de929c10975cb5ee694a71b7
# Parent  a55a1e00e121bda5670277150f11dcc8611cc7b5
Fixed hanging in the built-in output validator when output lengths differ

diff -r a55a1e00e121 -r 760d38ee86d6 upreckon/testcases.py
--- a/upreckon/testcases.py	Mon Jun 20 17:56:47 2011 +0300
+++ b/upreckon/testcases.py	Wed Jun 29 01:26:33 2011 +0300
@@ -207,6 +207,8 @@
 					refbuffer += refdata
 					if not (buffer or refbuffer or crlfhalf or refcrlfhalf):
 						break
+					elif not buffer and not crlfhalf or not refbuffer and not refcrlfhalf:
+						raise WrongAnswer
 					size = min(len(buffer), len(refbuffer))
 					if buffer[:size] != refbuffer[:size]:
 						raise WrongAnswer