Ignore:
Timestamp:
Jan 21, 2024, 10:17:50 PM (19 months ago)
Author:
gyoung
Message:

Fix warnings and error found by C++Check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mediafolder/c/mediafldr/mediafolder.cpp

    r133 r142  
    768768
    769769  if(contentObject->somIsA(mmMIDIClass))
    770     strncpy(chrDevice,"SEQUENCER", sizeof(chrDevice));
     770    strncpy(chrDevice,"SEQUENCER", sizeof(chrDevice) - 1);
    771771  else /*if(contentObject->somIsA(cwAudioClass) || contentObject->somIsA(mmAudioClass))*/
    772772    strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice));
     
    10801080
    10811081  if(contentObject->somIsA(mmMIDIClass))
    1082     strncpy(chrDevice,"SEQUENCER", sizeof(chrDevice));
     1082    strncpy(chrDevice,"SEQUENCER", sizeof(chrDevice) - 1);
    10831083  else /*if(contentObject->somIsA(cwAudioClass) || contentObject->somIsA(mmAudioClass))*/
    10841084    strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice));
Note: See TracChangeset for help on using the changeset viewer.