A small bug in pgstr_utf8_seek
Raghu Ram Murthy <[email protected]> Wed, 28 Apr 2004 10:16:21 -0700 (PDT)
| Newsgroups | gmane.comp.video.picogui.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
textbox widget doesn't have PG_WP_FONT property. I
added this and tried with some UTF-8 characters. I
found a small bug in pgstr_utf8_seek function in
gcore/pgstring.c file.
In the follwing block of code, in the else part,
str->num_bytes should be there, rather than
str->num_chars, becuase pgstring_iterator.offset is
byte offset, not character offset.
case PGSEEK_END:
if (str->num_chars < 1)
p->offset = 0;
else
/* p->offset = str->num_chars - 1; */
p->offset = str->num_bytes - 1;
break;
regards,
raghu
=====
-----------------------------------------
P.Raghu Ram Murthy, M-tech (Computer Science),
Room No - 245,
Brahmaputra Hostel,
Indian Institute of Technology Madras,
Chennai - 36.
Mobile: (0) 98402 81944
------------------------------------------
---------------------------------
Trouble with windows? Re boot....
Trouble with Linux? Be root....
---------------------------------
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click