Browse Source

speak_lib.cpp: Do not crash if espeak_SetPunctuationList is called with a NULL punctuation list.

master
Reece H. Dunn 12 years ago
parent
commit
c1196192e5
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/speak_lib.cpp

+ 2
- 1
src/speak_lib.cpp View File

/*************************************************************************** /***************************************************************************
* Copyright (C) 2005 to 2013 by Jonathan Duddington * * Copyright (C) 2005 to 2013 by Jonathan Duddington *
* email: [email protected] * * email: [email protected] *
* Copyright (C) 2013 Reece H. Dunn *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
my_unique_identifier = 0; my_unique_identifier = 0;
my_user_data = NULL; my_user_data = NULL;


wcsncpy(option_punctlist, punctlist, N_PUNCTLIST);
wcsncpy(option_punctlist, punctlist ? punctlist : L"", N_PUNCTLIST);
option_punctlist[N_PUNCTLIST-1] = 0; option_punctlist[N_PUNCTLIST-1] = 0;
} // end of sync_espeak_SetPunctuationList } // end of sync_espeak_SetPunctuationList



Loading…
Cancel
Save