24 January 2012, 15:02 | #1 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 6,985
|
clipboard sharing: wrong buffer size
When inserting a text clip in AmigaOS which was cut from Windows, the CHRS chunk is too long for one byte per line. I suppose that the size is calculated with cr-lf as end-of-line sequence and the cr characters are removed afterwards leaving one byte per line too much in the length field. Single-line clips are ok.
The problem does not show in editors which can only use printable characters because they cut the clip at \0. But editors which can include \0 characters in the text (like CygnusEd) will include the garbage at the end of the clip. I've attached a small test program which displays the discrepancy. |
24 January 2012, 19:29 | #2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
You are correct, size of buffer was calculated after line-ending conversion but size calculation used original buffer pointer...
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Clipboard sharing: support for images | thomas | request.UAE Wishlist | 8 | 12 June 2010 22:14 |
HD on A1200 reporting wrong size | zeropolis79 | support.Hardware | 5 | 26 October 2009 06:00 |
Screenshots wrong size ? | tomcat666 | project.MAGE | 2 | 28 March 2008 12:13 |
Is Amiga-Windows clipboard sharing possible? | Snakeroot | request.UAE Wishlist | 7 | 23 June 2006 02:06 |
Only OS3.9 HDD wrong size | fc.studio | support.Apps | 0 | 29 October 2005 22:57 |
|
|