summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/physac.h4
-rw-r--r--src/raylib.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/physac.h b/src/physac.h
index ab975e28..038361a4 100644
--- a/src/physac.h
+++ b/src/physac.h
@@ -606,7 +606,7 @@ PHYSACDEF void PhysicsShatter(PhysicsBody body, Vector2 position, float force)
{
int count = vertexData.vertexCount;
Vector2 bodyPos = body->position;
- Vector2 vertices[count];
+ Vector2 *vertices = (Vector2*)malloc(sizeof(Vector2) * count);
Mat2 trans = body->shape.transform;
for (int i = 0; i < count; i++) vertices[i] = vertexData.positions[i];
@@ -698,6 +698,8 @@ PHYSACDEF void PhysicsShatter(PhysicsBody body, Vector2 position, float force)
// Apply force to new physics body
PhysicsAddForce(newBody, forceDirection);
}
+
+ free(vertices);
}
}
}
diff --git a/src/raylib.h b/src/raylib.h
index 3bd16f00..9d870255 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -1075,7 +1075,7 @@ RLAPI Font GetFontDefault(void);
RLAPI Font LoadFont(const char *fileName); // Load font from file into GPU memory (VRAM)
RLAPI Font LoadFontEx(const char *fileName, int fontSize, int charsCount, int *fontChars); // Load font from file with extended parameters
RLAPI CharInfo *LoadFontData(const char *fileName, int fontSize, int *fontChars, int charsCount, int type); // Load font data for further use
-RLAPI Image GenImageFontAtlas(CharInfo *chars, int fontSize, int charsCount, int padding, int packMethod); // Generate image font atlas using chars info
+RLAPI Image GenImageFontAtlas(CharInfo *chars, int charsCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
RLAPI void UnloadFont(Font font); // Unload Font from GPU memory (VRAM)
// Text drawing functions