/C causes stack overflow in EKEYS v0.48.0

#1
The following,
Code:
ekey /c alt-a=echo #
works fine in EKEYS v0.40.1 but fails miserably in v0.48.0. If I type
Code:
c:\test> this is a test
and then pres alt-a I get
Code:
C:\test>this is a tesTCC: (Sys) Recursion too deep; the stack overflowed.
"key"
If I do it again I get
Code:
C:\test>this is a testTCC: (Sys) Invalid access to memory location.
"key"
I'm running TCC 15.01.58 Windows XP [Version 5.1.2600]

-- Howard
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,575
46
Albuquerque, NM
prospero.unm.edu
#4
I don't know enough about what you're doing to understand what's wrong with that but it's obvious that you do since the new version you posted last night works great. Thanks!
I'm decrementing a pointer, and the loop ends when it goes negative. Originally the variable was a regular (signed) integer, and the loop worked fine. Somewhere along the line I changed it to a 'size_t', which is an unsigned pointer. Decrementing an unsigned pointer until it goes negative... "fails miserably" is a polite way of putting it.

I don't even remember why I changed it. The buffer is big, but it's not that big.