• Join/Login
  • Business Software
  • Open Source Software
  • For Vendors
  • Blog
  • About
  • More
    • Articles
    • Create
    • SourceForge Podcast
    • Site Documentation
    • Subscribe to our Newsletter
    • Support Request
SourceForge logo
For Vendors Help Create Join Login
SourceForge logo
Business Software
Open Source Software
SourceForge Podcast
Resources
  • Articles
  • Case Studies
  • Blog
Menu
  • Help
  • Create
  • Join
  • Login
  • Home
  • Browse
  • FMSLogo
  • Bugs
FMSLogo

Commander/Editor fonts don't persist across restart for font names >14 chars

A Logo programming environment for Microsoft Windows

Brought to you by: david_costanzo
  • Summary
  • Files
  • Reviews
  • Support
  • Tickets ▾
    • Feature Requests
    • Bugs
    • Support Requests
  • Discussion
  • Code
Menu ▾ ▴
  • Create Ticket
  • View Stats

Group

  • v_6.06x
  • v_6.07.X
  • v_6.08.X
  • v_6.10.X
  • v_6.11.X
  • v_6.13.X
  • v_6.22.X
  • v_6.25.X
  • v_6.26.X
  • v_6.27.X
  • v_6.28.X
  • v_6.29.X

Searches

  • Changes
  • Closed Tickets
  • Open Tickets

Help

  • Formatting Help

#626 Commander/Editor fonts don't persist across restart for font names >14 chars

v_6.06x
open
nobody
None
5
2026-10-24
2026-10-24
David Costanzo
No

If you set a font for the commander or the editor, FMSLogo is supposed to keep your preference saved when you restart it. However, if the font face name is longer than 14 characters, FMSLogo fails to preserve the select font name. It does keep the other spaces of the font, including its size.

This was reported by Daniel Ajoy as Support Request #53 as a bug when running under wine, but it applies to Windows as well. It's more visible on Wine because the font names on Linux are generally longer. Font face names on Windows are usually shorter than 14 characters.

The bug is a simple coding error that mixed up character count and byte count. The bug is in how GetConfigurationString checks the return value from RegQueryValueEx:

LONG result = RegQueryValueEx(..., valuePtr, &valueSize);
if (result == ERROR_SUCCESS &&
    valueType == REG_SZ     &&
    valueSize < ValueLength - 1)   // <-- BUG: comparing bytes to chars
{
    ... handle success
}

Here, ValueLength is given in characters. However, RegQueryValueEx sets valueSize to the number of bytes in the return value. Therefore, if the number of bytes in font face name happens to be greater or equal to the maximum number of characters that's legal for a font name minus 1, FMSLogo treats the stored value as corrupt and uses a default value. For font names, the maximum possible is 32 characters and there are two bytes per character, which means that if the length is greater or equal to(32-1)/2, or 15, the default is used.

I expect that this is a regression from FMSlogo 8.0.0, which introduced support for Unicode. I haven't confirmed this.

Related

Support Requests: #53

Discussion


Log in to post a comment.

SourceForge
  • Create a Project
  • Open Source Software
  • Business Software
  • Top Downloaded Projects
Company
  • About
  • Team
  • SourceForge Headquarters
    1320 Columbia Street Suite 310
    San Diego, CA 92101
    +1 (858) 422-6466
Resources
  • Support
  • Site Documentation
  • Site Status
  • SourceForge Reviews
SourceForge logo
© 2026 Slashdot Media. All Rights Reserved.
Terms Privacy Opt Out Advertise
veeam logo