Explicitly define winding as being signed

This commit is contained in:
Icecream95 (gitlab.com/icecream95) 2019-10-21 17:39:28 +13:00 committed by Jakob Botsch Nielsen
parent c40188c796
commit 57610fa6ef

View File

@ -1009,7 +1009,7 @@ bool rcBuildContours(rcContext* ctx, rcCompactHeightfield& chf,
if (cset.nconts > 0) if (cset.nconts > 0)
{ {
// Calculate winding of all polygons. // Calculate winding of all polygons.
rcScopedDelete<char> winding((char*)rcAlloc(sizeof(char)*cset.nconts, RC_ALLOC_TEMP)); rcScopedDelete<signed char> winding((signed char*)rcAlloc(sizeof(signed char)*cset.nconts, RC_ALLOC_TEMP));
if (!winding) if (!winding)
{ {
ctx->log(RC_LOG_ERROR, "rcBuildContours: Out of memory 'hole' (%d).", cset.nconts); ctx->log(RC_LOG_ERROR, "rcBuildContours: Out of memory 'hole' (%d).", cset.nconts);