浏览代码

fixed a bug: use "OR" instead of "&"; this bug led to terrible access violation traps with crashing of the system

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@6816 8c9fc860-2736-0410-a75d-ab315db34111
eth.morozova 9 年之前
父节点
当前提交
9588ed395b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      source/I386.Raster.Mod

+ 1 - 1
source/I386.Raster.Mod

@@ -3007,7 +3007,7 @@ MODULE Raster; (** non-portable *)	(* eos, TF  **)
 		VAR bit: LONGINT; adr: ADDRESS;
 	BEGIN
 		(*ASSERT((0 <= x) & (x < img.width) & (0 <= y) & (y < img.height), 100);*) (*avoid a HALT if roundoff errors from higher levels occur here*)
-		IF (0 > x) OR (x >= img.width) OR (0 > y) & (y >= img.height) THEN RETURN END;
+		IF (0 > x) OR (x >= img.width) OR (0 > y) OR (y >= img.height) THEN RETURN END;
 		bit := x * img.fmt.bpp; adr := img.adr + y * img.bpr + bit DIV 8; bit := bit MOD 8;
 		Bind(mode, PixelFormat, img.fmt);
 		mode.transfer(mode, ADDRESSOF(pix[0]), 0, adr, bit, 1)