Changeset 5475ecf in buchla-emu for emu/ser.c


Ignore:
Timestamp:
09/03/2017 10:37:08 AM (7 years ago)
Author:
Alexander Heinrich <alex.heinrich@…>
Branches:
master
Children:
f51359c
Parents:
43ea417 (diff), 4f967e8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of ssh://bob.lopatic.de:11501/home/git/buchla-emu into lcda

File:
1 edited

Legend:

Unmodified
Added
Removed
  • emu/ser.c

    r43ea417 r5475ecf  
    6060};
    6161
    62 static uint8_t mem[CON_H][CON_W + 1];
     62static uint8_t mem[CON_H][CON_W];
    6363
    6464static SDL_Window *win;
     
    8181static void scroll(void)
    8282{
    83         memmove(mem, mem + 1, (CON_H - 1) * (CON_W + 1));
     83        memmove(mem, mem + 1, (CON_H - 1) * CON_W);
    8484        memset(mem + (CON_H - 1), ' ', CON_W);
    8585}
     
    256256        for (int32_t y = 0; y < CON_H; ++y) {
    257257                char line[CON_W + 1];
     258                line[CON_W] = 0;
    258259
    259260                if (SDL_LockMutex(cpu_mutex) < 0) {
     
    261262                }
    262263
    263                 memcpy(line, mem[y], CON_W + 1);
     264                memcpy(line, mem[y], CON_W);
    264265
    265266                if (SDL_UnlockMutex(cpu_mutex) < 0) {
     
    515516                        mem[y][x] = ' ';
    516517                }
    517 
    518                 mem[y][CON_W] = 0;
    519518        }
    520519}
Note: See TracChangeset for help on using the changeset viewer.