From 4a60393a1cc9ac3554c88a74e86cf8015d95c630 Mon Sep 17 00:00:00 2001 From: "BADIM-PC\\Vadim" Date: Wed, 31 Jan 2018 17:37:43 +0300 Subject: [PATCH] Code from other banks gets added to bank 0, if using external editor. #516 --- src/console.c | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/src/console.c b/src/console.c index 8c07acf..9e7e3b3 100644 --- a/src/console.c +++ b/src/console.c @@ -684,32 +684,13 @@ static bool loadTextSection(const char* project, const char* comment, char* dst, const char* end = project + strlen(project); { - char tagbuf[64]; - char tag[16]; + char tagstart[16]; + sprintf(tagstart, "\n%s <", comment); - for(s32 i = 0; i < COUNT_OF(BinarySections); i++) - { - for(s32 b = 0; b < TIC_BANKS; b++) - { - makeTag(BinarySections[i].tag, tag, b); + const char* ptr = SDL_strstr(project, tagstart); - sprintf(tagbuf, "\n%s <%s>", comment, tag); - - const char* ptr = SDL_strstr(project, tagbuf); - - if(ptr && ptr < end) - end = ptr; - } - } - - { - sprintf(tagbuf, "\n%s ", comment); - - const char* ptr = SDL_strstr(project, tagbuf); - - if(ptr && ptr < end) - end = ptr; - } + if(ptr && ptr < end) + end = ptr; } if(end > start)