Hello,

I'm using FLTK 1.3 r6634 and I am seeing a potential off-by-one error with
Fl:event_length(). In past revision of FLTK 1.3.x, Fl::event_length() would
return the number of bytes stored in Fl::event_text() (upon receiving a
FL_PASTE after a FL_DND_RELEASE event). However, what I am seeing now is
the Fl::event_length() is returning the number of characters. The
difference this make is that the null-terminator is not included in the
count returned by Fl::event_length().

The effect this has is when I try to copy the text that is returned by
Fl::event_text() I append the null-terminator at
copy_text[Fl::event_length()-1] = '\0'; What this does in r6638 is remove
the last character. So, with a URL of "/home/alvin/file.png" I
get "/home/alvin/file.pn". In past revision (not sure when this
started) I would get "/home/alvin/file.png"

Anyone else experiencing this?

P.S. I had to manipulate this message in order to be able to post this
message. For some reason news.easysw.com say this post as spam?

-- 
Alvin
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to