[Scummvm-git-logs] scummvm master -> ca897681610c2ab7d80fa6c2b23bf698d8070917

aquadran noreply at scummvm.org
Mon Jun 27 20:21:56 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
ca89768161 TINYGL: avoid zero division when drawing lines (#4064)


Commit: ca897681610c2ab7d80fa6c2b23bf698d8070917
    https://github.com/scummvm/scummvm/commit/ca897681610c2ab7d80fa6c2b23bf698d8070917
Author: neuromancer (neuromancer at users.noreply.github.com)
Date: 2022-06-27T22:21:54+02:00

Commit Message:
TINYGL: avoid zero division when drawing lines (#4064)

TINYGL: avoid zero division when drawing lines

Changed paths:
    graphics/tinygl/zline.cpp


diff --git a/graphics/tinygl/zline.cpp b/graphics/tinygl/zline.cpp
index 1d6d58b5a9d..c09cc26196e 100644
--- a/graphics/tinygl/zline.cpp
+++ b/graphics/tinygl/zline.cpp
@@ -105,6 +105,8 @@ void FrameBuffer::drawLine(const ZBufferPoint *p1, const ZBufferPoint *p2) {
 	int sr, sg, sb;
 
 	if (kInterpZ) {
+		if (n == 0)
+			return
 		sz = (p2->z - p1->z) / n;
 		z = p1->z;
 	}




More information about the Scummvm-git-logs mailing list