(svn r4301) - Fix: the maxlength parameter of Textbuf is supposed to be the size of the buffer (so length of string + '\0'), but in the code it was a mix of both. It didn't cause any problems though, only an occasionaly one-less character than allowed. (thanks Tron for noticing)

This commit is contained in:
Darkvater
2006-04-06 19:11:41 +00:00
parent dfe10d9db0
commit c8a85d5419
5 changed files with 16 additions and 16 deletions

View File

@@ -238,7 +238,7 @@ enum {
typedef struct Textbuf {
char *buf; /* buffer in which text is saved */
uint16 maxlength, maxwidth; /* the maximum size of the buffer. Maxwidth specifies screensize in pixels */
uint16 length, width; /* the current size of the buffer. Width specifies screensize in pixels */
uint16 length, width; /* the current size of the string. Width specifies screensize in pixels */
bool caret; /* is the caret ("_") visible or not */
uint16 caretpos; /* the current position of the caret in the buffer */
uint16 caretxoffs; /* the current position of the caret in pixels */