[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

field buffer vs visible field size

From: tjareson
Subject: field buffer vs visible field size
Date: Sun, 07 Jul 2013 11:22:11 -0300
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130623 Thunderbird/17.0.7


I'm using the ncurses forms a lot and have sometimes the situation that the string I'm assigning by pointer to a field with set_field_buffer is bigger than the field size (including off screen rows), which leads to the result that characters are cut off at the end when the field is displayed. (which is the required behavior - I don't want to show the seconds of a time stamp, so I made the field 3 characters short than the content)

I'm only not sure if that cause any potential problem of memory corruption within the forms library? (As these kind of problems do not necessarily need to cause an error everytime)

Of course I could check the field length and shorten the assigned string accordingly, but would like to safe the code if it is not really necessary.

Any hints?

kind regards

reply via email to

[Prev in Thread] Current Thread [Next in Thread]