diff options
author | Thomas White <taw@bitwiz.org.uk> | 2013-08-20 09:31:31 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2013-08-20 09:31:31 +0200 |
commit | 0d1812f8a9ce4ac822b90fd94affcf7068904888 (patch) | |
tree | faec5ac0135ab2d620fc00aaf1a70dcec21bedf1 /src | |
parent | 24e4c90fa9de25bc5c6613b1217c20ab174b2516 (diff) |
Fix string length
Diffstat (limited to 'src')
-rw-r--r-- | src/mainwindow.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mainwindow.c b/src/mainwindow.c index c5d9a9c..b152bd0 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -251,8 +251,9 @@ static gint add_furniture(GtkWidget *widget, struct menu_pl *pl) fr->style = sty; fr->lop_from_style = 1; set_edit(p, p->cur_edit_slide); - fr->sc = strdup(""); - fr->sc_len = 6; + fr->sc = malloc(1); + fr->sc[0] = '\0'; + fr->sc_len = 1; set_selection(p, fr); fr->pos = 0; p->cursor_pos = 0; |