aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/gob.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gob/gob.h')
-rw-r--r--engines/gob/gob.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/gob/gob.h b/engines/gob/gob.h
index a3da4f4fd3..222b6a84f2 100644
--- a/engines/gob/gob.h
+++ b/engines/gob/gob.h
@@ -103,6 +103,12 @@ enum SaveFiles {
SAVE_BLO // Notes
};
+inline char *strncpy0(char *dest, const char *src, size_t n) {
+ strncpy(dest, src, n);
+ dest[n] = 0;
+ return dest;
+}
+
// A "smart" reference counting templated class
template<typename T>
class ReferenceCounter {