Fix array size computation

This fixes an array size computation that assumed that the array elements
are char * when in fact they are char arrays.
This commit is contained in:
Sebastian Holtermann 2024-12-02 18:01:00 +01:00
parent 73bf2ebeaa
commit 8ffbc6c5ea

View File

@ -537,7 +537,7 @@ const char *ddio_MouseGetBtnText(int btn) {
} }
const char *ddio_MouseGetAxisText(int axis) { const char *ddio_MouseGetAxisText(int axis) {
if (axis >= (sizeof(Ctltext_MseAxisBindings) / sizeof(char *)) || axis < 0) if (axis >= static_cast<int>(sizeof(Ctltext_MseAxisBindings) / sizeof(Ctltext_MseAxisBindings[0])) || axis < 0)
return (""); return ("");
return Ctltext_MseAxisBindings[axis]; return Ctltext_MseAxisBindings[axis];
} }