aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb
diff options
context:
space:
mode:
authorD G Turner2019-09-14 02:47:55 +0100
committerD G Turner2019-09-14 02:47:55 +0100
commit076514da3f027cf59d3eab6e170e451a2e64bcb9 (patch)
tree7b9dcd2598aac82d0dbc76585c60943e815dfcef /engines/hdb
parent8fe7f80d0c50fb50c41e700f2ffa694a0574641e (diff)
downloadscummvm-rg350-076514da3f027cf59d3eab6e170e451a2e64bcb9.tar.gz
scummvm-rg350-076514da3f027cf59d3eab6e170e451a2e64bcb9.tar.bz2
scummvm-rg350-076514da3f027cf59d3eab6e170e451a2e64bcb9.zip
HDB: Improve String Buffer Usage in AI Inventory Code
Diffstat (limited to 'engines/hdb')
-rw-r--r--engines/hdb/ai-inventory.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/hdb/ai-inventory.cpp b/engines/hdb/ai-inventory.cpp
index abdfc2722d..05f75703cb 100644
--- a/engines/hdb/ai-inventory.cpp
+++ b/engines/hdb/ai-inventory.cpp
@@ -284,15 +284,15 @@ void AI::newDelivery(const char *itemTextName, const char *itemGfxName, const ch
}
if (itemTextName)
- strcpy(_deliveries[i].itemTextName, itemTextName);
+ Common::strlcpy(_deliveries[i].itemTextName, itemTextName, sizeof(_deliveries[0].itemTextName));
if (itemGfxName)
- strcpy(_deliveries[i].itemGfxName, itemGfxName);
+ Common::strlcpy(_deliveries[i].itemGfxName, itemGfxName, sizeof(_deliveries[0].itemGfxName));
if (destTextName)
- strcpy(_deliveries[i].destTextName, destTextName);
+ Common::strlcpy(_deliveries[i].destTextName, destTextName, sizeof(_deliveries[0].destTextName));
if (destGfxName)
- strcpy(_deliveries[i].destGfxName, destGfxName);
+ Common::strlcpy(_deliveries[i].destGfxName, destGfxName, sizeof(_deliveries[0].destGfxName));
- strcpy(_deliveries[i].id, id);
+ Common::strlcpy(_deliveries[i].id, id, sizeof(_deliveries[0].id));
_numDeliveries++;