no message
This commit is contained in:
parent
9efb523a63
commit
bbfa4dfb51
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue