Compatibility fix

This commit is contained in:
Alexander S. Aganichev 2002-10-26 20:30:54 +00:00
parent a1f5bf1f8e
commit e9881a6129
2 changed files with 6 additions and 1 deletions

View File

@ -12,6 +12,9 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________
- Compatibility fix for http://www.chat.ru/~tulser/clipbrd.zip. Though
it is not GoldED+ fault.
- Some fixes for replying through the gate. If someone use
"INTERNETREPLY NO" please report if it get broken with this changes.

View File

@ -221,7 +221,9 @@ char* g_get_clip_text(void) {
cpu.genint(0x2f);
len = cpu.ax() + (cpu.dx() << 16);
if(len != 0)
if((seg = __dpmi_allocate_dos_memory(len >> 4, &selector)) != -1) {
// For compatibility with http://www.chat.ru/~tulser/clipbrd.zip
// we'll round up memory.
if((seg = __dpmi_allocate_dos_memory((len + 0x1f) >> 4, &selector)) != -1) {
// Get clipboard data
cpu.ax(0x1705);
cpu.dx(0x07); // OEM text