From 26e9e8d63ffab9b6d2cc3c83d8ed1c758eba6496 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sun, 24 Jan 2016 17:50:18 -0800 Subject: [PATCH] GBA Cheats: Remove trailing newline --- src/gba/cheats.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gba/cheats.c b/src/gba/cheats.c index a9702bd4e..097679bc5 100644 --- a/src/gba/cheats.c +++ b/src/gba/cheats.c @@ -265,6 +265,7 @@ bool GBACheatParseFile(struct GBACheatDevice* device, struct VFile* vf) { do { ++i; } while (isspace((int) cheat[i])); + cheat[strlen(cheat) - 1] = '\0'; // Remove trailing newline newSet = malloc(sizeof(*set)); GBACheatSetInit(newSet, &cheat[i]); newSet->enabled = !nextDisabled;