aboutsummaryrefslogtreecommitdiff
path: root/queen
diff options
context:
space:
mode:
Diffstat (limited to 'queen')
-rw-r--r--queen/talk.cpp9
-rw-r--r--queen/talk.h2
2 files changed, 8 insertions, 3 deletions
diff --git a/queen/talk.cpp b/queen/talk.cpp
index 4ed89f9795..2b211400b0 100644
--- a/queen/talk.cpp
+++ b/queen/talk.cpp
@@ -605,13 +605,18 @@ int Talk::countSpaces(const char *segment) {
}
void Talk::speakSegment(
- const char *segment,
+ const char *segmentStart,
int length,
Person *person,
int command,
const char *voiceFilePrefix,
int index) {
- // Function SPEAK_SUB, lines 1406-1870 in talk.c
+ // Function SPEAK_SUB, lines 1406-1870 in talk.a
+
+ char segment[MAX_STRING_SIZE];
+ memcpy(segment, segmentStart, length);
+ segment[length] = '\0';
+
char voiceFileName[MAX_STRING_SIZE];
snprintf(voiceFileName, sizeof(voiceFileName), "%s%1x", voiceFilePrefix, index);
diff --git a/queen/talk.h b/queen/talk.h
index 6b14d48ddc..557d68e041 100644
--- a/queen/talk.h
+++ b/queen/talk.h
@@ -186,7 +186,7 @@ class Talk {
//! Speak a part of a sentence
void speakSegment(
- const char *segment,
+ const char *segmentStart,
int length,
Person *person,
int command,