Silly error in buffer.c
Bug #650828 reported by
agricola
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NakedMud |
In Progress
|
High
|
agricola |
Bug Description
This bug can manifest itself in a number of ways, essentially causing random crashes. It mainly happens when the OLC is used. Buffers of a particular length are not extended when they should be, causing much agony.
Line 126 of buffer.c should be changed from
if(to_replace * (b_len - a_len) + buf->len > buf->maxlen)
to
if(to_replace * (b_len - a_len) + buf->len >= buf->maxlen)
Changed in nakedmud: | |
assignee: | nobody → agricola (agricola) |
status: | New → In Progress |
importance: | Undecided → Critical |
importance: | Critical → High |
To post a comment you must log in.
An alternate/ ancillary/ complementary fix offered by Stendec was to change line 113 from:
int len_needed = buf->maxlen;
to
int len_needed = buf->maxlen + 1;