1
0
Fork 0
mirror of https://git.coom.tech/drummyfish/small3dlib.git synced 2024-12-22 01:26:17 +01:00

Fix uninitialized value

This commit is contained in:
Miloslav Číž 2019-05-12 17:42:03 +02:00
parent 4324cd1c76
commit 9297cc7c79

6
s3l.h
View file

@ -508,9 +508,9 @@ void S3L_makeScaleMatrix(
{
#define M(x,y) (*m)[x][y]
M(0,0) = scaleX; M(2,0) = 0; M(3,0) = 0;
M(0,0) = scaleX; M(1,0) = 0; M(2,0) = 0; M(3,0) = 0;
M(0,1) = 0; M(1,1) = scaleY; M(2,1) = 0; M(3,1) = 0;
M(0,2) = 0; M(1,2) = 0; M(2,2) = scaleZ; M(3,2) = 0;
M(0,2) = 0; M(1,2) = 0; M(2,2) = scaleZ; M(3,2) = 0;
M(0,3) = 0; M(1,3) = 0; M(2,3) = 0; M(3,3) = S3L_FRACTIONS_PER_UNIT;
#undef M
@ -1374,7 +1374,7 @@ void S3L_drawModelIndexed(
S3L_Index coordIndex = 0;
S3L_Vec4 pointModel, transformed0, transformed1, transformed2;
S3L_Unit indexIndex;
S3L_Unit indexIndex = 0;
pointModel.w = S3L_FRACTIONS_PER_UNIT; // has to be "1.0" for translation