mirror of
https://git.coom.tech/drummyfish/small3dlib.git
synced 2024-12-22 01:26:17 +01:00
Fix segfault
This commit is contained in:
parent
68d1028d2b
commit
4354e98908
2 changed files with 4 additions and 3 deletions
|
@ -1531,7 +1531,8 @@ void S3L_drawTriangle(
|
|||
loop */
|
||||
#endif
|
||||
|
||||
if (rXClipped < lXClipped)
|
||||
if (rXClipped < lXClipped &&
|
||||
lXClipped < S3L_RESOLUTION_X && rXClipped >= 0)
|
||||
{
|
||||
/* This can sometimes happen because of numerical errors in sorting
|
||||
left vs right triangle point, which are compared based on SLOPE, not
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
#define S3L_PIXEL_FUNCTION drawPixel
|
||||
|
||||
#define S3L_RESOLUTION_X 110
|
||||
#define S3L_RESOLUTION_Y 88
|
||||
#define S3L_RESOLUTION_X 640
|
||||
#define S3L_RESOLUTION_Y 480
|
||||
|
||||
#include "small3dlib.h"
|
||||
|
||||
|
|
Loading…
Reference in a new issue