Skip to content

Commit bc87471

Browse files
committed
Call memset() to zero out VOICE_INFO
1 parent 23b0dd1 commit bc87471

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

sapi4.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ typedef CTestNotify *PCTestNotify;
2828

2929

3030
typedef struct _VOICE_INFO {
31-
PITTSCENTRAL pITTSCentral = NULL;
31+
PITTSCENTRAL pITTSCentral;
3232
TTSMODEINFO ModeInfo;
33-
PIAUDIOFILE pIAF = NULL;
34-
PITTSATTRIBUTES pITTSAttributes = NULL;
33+
PIAUDIOFILE pIAF;
34+
PITTSATTRIBUTES pITTSAttributes;
3535

3636
WORD defPitch, minPitch, maxPitch;
3737
DWORD defSpeed, minSpeed, maxSpeed;
3838

3939
PCTestNotify pNotify;
40-
BOOL VoiceDone = FALSE;
40+
BOOL VoiceDone;
4141
} VOICE_INFO, *PVOICE_INFO;
4242

4343
extern __declspec(dllexport) VOID TTSCleanup(

sapi4limits.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ int main(int argc, char** argv)
1111
{
1212
if (argc == 2) {
1313
VOICE_INFO VoiceInfo;
14+
memset((void *)&VoiceInfo, 0, sizeof(VoiceInfo));
1415
if (!InitializeForVoice(argv[1], &VoiceInfo)) {
1516
return 0;
1617
}

sapi4out.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
int main(int argc, char** argv)
1111
{
1212
VOICE_INFO VoiceInfo;
13+
memset((void *)&VoiceInfo, 0, sizeof(VoiceInfo));
1314
if (!InitializeForVoice(argv[1], &VoiceInfo)) {
1415
return 0;
1516
}

0 commit comments

Comments
 (0)