Author Topic: What's your .NAME? Shootin' you straight, ... ?  (Read 92 times)

Robert

  • Hero Member
  • *****
  • Posts: 940
    • View Profile
What's your .NAME? Shootin' you straight, ... ?
« on: August 19, 2022, 11:44:51 PM »
BCX 7.9.2 line 24296
 
Code: [Select]
strcpy(COM_gl_names[COM_gl_names_free_index].NAME, p_name)
 should be
 
 
Code: [Select]
strcpy(COM_gl_names[COM_gl_names_free_index].name, p_name) 
Line 24317

Code: [Select]
    strcpy(COM_lc_names[COM_lc_names_free_index].NAME, p_name)   
should be

Code: [Select]
    strcpy(COM_lc_names[COM_lc_names_free_index].name, p_name)

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1369
    • View Profile
Re: What's your .NAME? Shootin' you straight, ... ?
« Reply #1 on: August 20, 2022, 01:17:08 AM »
Hi Robert,

Those errors don't exist in my archive. 

Moments ago, I downloaded the zip from the Announcements page and the errors don't exist there either.  There was a revision to 792 posted the day after I posted 792 the first time which involved removing some (at that time) recently placed (void*) casts to silence some compiler warnings, per a request by James Fuller.  When formatting code with BED, the case of "name" is not altered.  But its possible the 2nd upload of 792 was formatted with a different version of BED than the first upload, as I was doing a lot of work on BED at that time too.

If you have the original 792 zip ( I don't ) and it contains the errors then that could explain it.  Otherwise, it's a mystery.

https://bcxbasiccoders.com/smf/index.php?topic=754.0


Robert

  • Hero Member
  • *****
  • Posts: 940
    • View Profile
Re: What's your .NAME? Shootin' you straight, ... ?
« Reply #2 on: August 20, 2022, 01:31:57 AM »
O.K. Re-downloaded.

I must've misplaced the revision, because I do remember downloading it.

Anyway, there are two (INT)LEN calls in that COM neighborhood that cause an (int)(int)strlen.

(int)(int) sounds like two kids arguing.

Still thinking about Lynyrd Skynyrd back at the hotel.

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1369
    • View Profile
Re: What's your .NAME? Shootin' you straight, ... ?
« Reply #3 on: August 20, 2022, 01:45:38 AM »

Anyway, there are two (INT)LEN calls in that COM neighborhood that cause an (int)(int)strlen.


I understand ...  STR$(INT) is translated to (int)(int). 

I found only two instances and both have now been changed in 793.

Something good came out of this after all ... except now I can't get that Skynyrd song out of my head.

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1369
    • View Profile
Re: What's your .NAME? Shootin' you straight, ... ?
« Reply #4 on: August 20, 2022, 01:16:45 PM »
Going back to the original bug report, I've decided to help mitigate
possible future recurrences by changing the member name

from this

TYPE COM_NAMES_STORAGE     ' Used for COM variables
    name [cSizeOfName] AS CHAR
    initialized                  AS BOOL
END TYPE

to this

TYPE COM_NAMES_STORAGE     ' Used for COM variables
    com_VarName[cSizeOfName] AS CHAR
    initialized              AS BOOL
END TYPE