BUG in _CXSTR ... someplace

A forum for feature requests/discussions and user submitted patches that improve MQ2

Moderator: MacroQuest Developers

MacroFiend
a grimling bloodguard
a grimling bloodguard
Posts: 662
Joined: Mon Jul 28, 2003 2:47 am

BUG in _CXSTR ... someplace

Post by MacroFiend » Fri Oct 31, 2003 10:51 pm

When trying to read the data from the Text member, you only get 1 character. To see an example of this, rename your MQChat window. It will only save 1 character to the INI file.

If you change your INI to have a full name, it will load the whole thing.

I have no idea how to get the struct to be dynamic based on MaxLength for the Text field ... but I'm pretty sure that is where the problem is.

Code: Select all

//5-15-2003   eqmule 
typedef struct _CXSTR {
/*0x00*/   DWORD   Font;            // maybe, dont know.  04 = Window 01 = button
/*0x04*/   DWORD   MaxLength;
/*0x08*/   DWORD   Length;
/*0x0c*/   BOOL    Encoding; // 0: ASCII, 1:Unicode 
/*0x10*/   PCRITICAL_SECTION pLock;
[color=cyan]/*0x14*/   CHAR    Text[1]; // Stub, can be anywhere from Length to MaxLength (which is how much is malloc'd to this CXStr) [/color]
} CXSTR, *PCXSTR;

Ohmz
Developer
Developer
Posts: 97
Joined: Tue Feb 04, 2003 12:54 pm

Post by Ohmz » Fri Oct 31, 2003 11:00 pm

It probably has a constructor that does this

Plazmic
The One
The One
Posts: 800
Joined: Fri Jun 14, 2002 12:31 am
Contact:

Post by Plazmic » Sat Nov 01, 2003 12:04 am

The struct definition is correct. The save code may be bugged though.
- Plazmic

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Tue Nov 04, 2003 5:13 pm

Oh.. yeah the bug with this is most likely unicode string :) Making a function to grab the text correctly now.
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

Plazmic
The One
The One
Posts: 800
Joined: Fri Jun 14, 2002 12:31 am
Contact:

Post by Plazmic » Tue Nov 04, 2003 9:38 pm

I have that function written... it's used in the editmacro saving...
- Plazmic

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Tue Nov 04, 2003 9:43 pm

Didn't see it. Oh well, GetCXStr(PCXSTR pCXStr,PCHAR buffer, DWORD maxlen=MAX_STRING);

is in CVS
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: BUG in _CXSTR ... someplace

Post by xyilla » Mon Sep 29, 2025 8:42 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: BUG in _CXSTR ... someplace

Post by xyilla » Mon Sep 29, 2025 8:43 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: BUG in _CXSTR ... someplace

Post by xyilla » Mon Sep 29, 2025 8:44 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: BUG in _CXSTR ... someplace

Post by xyilla » Mon Sep 29, 2025 8:45 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: BUG in _CXSTR ... someplace

Post by xyilla » Mon Sep 29, 2025 8:46 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: BUG in _CXSTR ... someplace

Post by xyilla » Mon Sep 29, 2025 8:47 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: BUG in _CXSTR ... someplace

Post by xyilla » Mon Sep 29, 2025 8:49 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: BUG in _CXSTR ... someplace

Post by xyilla » Mon Sep 29, 2025 8:50 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: BUG in _CXSTR ... someplace

Post by xyilla » Mon Sep 29, 2025 8:51 am