mirror of
https://github.com/irssi/irssi.git
synced 2024-10-27 05:20:20 -04:00
Text buffer: Saving pointer to char[] didn't work correctly with
netbsd/alpha which caused crash soon after startup. Changed the code a bit, I'm not sure if it's still correct ANSI C but at least it seems to work fine with netbsd/alpha now :) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1397 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
db7c60b9a5
commit
9e1cbb2637
@ -81,7 +81,7 @@ static LINE_REC *create_line(GUI_WINDOW_REC *gui, int level)
|
||||
static TEXT_CHUNK_REC *create_text_chunk(GUI_WINDOW_REC *gui)
|
||||
{
|
||||
TEXT_CHUNK_REC *rec;
|
||||
char *buffer, *ptr;
|
||||
char *buffer, *ptr, **pptr;
|
||||
|
||||
g_return_val_if_fail(gui != NULL, NULL);
|
||||
|
||||
@ -94,8 +94,8 @@ static TEXT_CHUNK_REC *create_text_chunk(GUI_WINDOW_REC *gui)
|
||||
buffer = gui->cur_text->buffer + gui->cur_text->pos;
|
||||
*buffer++ = 0; *buffer++ = (char) LINE_CMD_CONTINUE;
|
||||
|
||||
ptr = rec->buffer;
|
||||
memcpy(buffer, &ptr, sizeof(char *));
|
||||
ptr = rec->buffer; pptr = &ptr;
|
||||
memcpy(buffer, pptr, sizeof(char *));
|
||||
} else {
|
||||
/* just to be safe */
|
||||
mark_temp_eol(rec);
|
||||
|
Loading…
Reference in New Issue
Block a user