       // return VFO frequency
       if (strlen(cmd) == 3)
       {
-        FreqBuffer[FreqBufferLen-1] = '\0';
-        return ulong2str(FreqBuffer, FreqBufferLen-2, VfoFrequency);
+        sprintf(FreqBuffer, "%ld", VfoFrequency);
+        return FreqBuffer;
       }
       break;
     case 'S':

//     value    the Frequency value to convert
// The function won't overflow the given buffer, it will truncate at the left.
// For example, given the value 1234 and a buffer of length 7, will fill the
// buffer with 0001234.  Given 123456789 it will fill with 3456789.
//
// Each byte in the buffer is a number in [0, 9], NOT ['0', '9'].
// The resultant buffer does NOT have a terminating '\0'!

            return "ERROR";
          }
        }
        VfoFrequency = strtol(cmd + 2, NULL, 10);
        display_sel_value(VfoFrequency, VfoSelectDigit, NumFreqChars,
                          NumCols - NumFreqChars - 2, 0);
        return "OK";
