Several issues
Opened this issue · 0 comments
Hello. When compiling little
on Linux I noticed several issues here.
-
Compatibility issues with
sprintf_s(...)
. This function only exists in Windows and the equivalent (for Unix-based systems) issnprintf(...)
. Windows do havesnprintf(...)
(see this) so using that function reasonably increase compatibility between two systems. Another function, calledstrncpy_s(...)
is again, Windows specific. However,strncpy(...)
can do exactly the same job except it will not havenumberOfElements
param (which seems to me unreasonable and confusing to use). -
There are several areas in code, I saw casting is unreasonable and does a totally different job. Most of them are incompatible pointer casts and at line 349; it's representing pointer insider pointer and comparing or doing arithmetic work will yield invalid operands error. I'm not sure which compiler you've used that ignores this thing.