no message

This commit is contained in:
BADIM-PC\Vadim 2017-11-11 17:43:29 +03:00
parent 9efb523a63
commit bbfa4dfb51
2 changed files with 10 additions and 4 deletions

View File

@ -143,9 +143,9 @@ static s32 getLinesCount(Code* code)
static void removeInvalidChars(char* code)
{
// remove \r symbol
char* s; char* d;
for(s = d = code; (*d = *s); d += (*s++ != '\r'));
// remove \r symbol
char* s; char* d;
for(s = d = code; (*d = *s); d += (*s++ != '\r'));
}
static void updateEditor(Code* code)
@ -647,7 +647,7 @@ static void pageDown(Code* code)
s32 line = 0;
getCursorPosition(code, &column, &line);
s32 lines = getLinesCount(code);
setCursorPosition(code, column, line < lines - TEXT_BUFFER_HEIGHT ? line + TEXT_BUFFER_HEIGHT : lines);
setCursorPosition(code, column, line < lines - TEXT_BUFFER_HEIGHT ? line + TEXT_BUFFER_HEIGHT : lines);
}
static bool replaceSelection(Code* code)

View File

@ -1815,6 +1815,12 @@ static bool loadProject(Console* console, const char* data, s32 size)
SDL_memcpy(project, data, size);
project[size] = '\0';
// remove all the '\r' chars
{
char *s, *d;
for(s = d = project; (*d = *s); d += (*s++ != '\r'));
}
tic_cartridge* cart = (tic_cartridge*)SDL_malloc(sizeof(tic_cartridge));
if(cart)