summaryrefslogtreecommitdiff
path: root/src/os/macosx
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2014-04-23 20:44:42 +0000
committerfrosch <frosch@openttd.org>2014-04-23 20:44:42 +0000
commitef4c2ce0317ae583e837722b6a41ea44cd83da71 (patch)
treec0c3d77ac495a6b9257cd7de4dadc6712db1acc8 /src/os/macosx
parent56e8ea6ddef08eb6ad1a28d06dddecb902e1bc04 (diff)
downloadopenttd-ef4c2ce0317ae583e837722b6a41ea44cd83da71.tar.xz
(svn r26485) -Codechange: Replace ttd_strlcpy and ttd_strlcat with strecpy and strecat.
Diffstat (limited to 'src/os/macosx')
-rw-r--r--src/os/macosx/macos.mm8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/os/macosx/macos.mm b/src/os/macosx/macos.mm
index 1b1a1d5a7..8d34cda58 100644
--- a/src/os/macosx/macos.mm
+++ b/src/os/macosx/macos.mm
@@ -155,11 +155,11 @@ const char *GetCurrentLocale(const char *)
/**
* Return the contents of the clipboard (COCOA).
*
- * @param buffer Clipboard content..
- * @param buff_len Length of the clipboard content..
+ * @param buffer Clipboard content.
+ * @param last The pointer to the last element of the destination buffer
* @return Whether clipboard is empty or not.
*/
-bool GetClipboardContents(char *buffer, size_t buff_len)
+bool GetClipboardContents(char *buffer, const char *last)
{
NSPasteboard *pb = [ NSPasteboard generalPasteboard ];
NSArray *types = [ NSArray arrayWithObject:NSStringPboardType ];
@@ -171,7 +171,7 @@ bool GetClipboardContents(char *buffer, size_t buff_len)
NSString *string = [ pb stringForType:NSStringPboardType ];
if (string == nil || [ string length ] == 0) return false;
- ttd_strlcpy(buffer, [ string UTF8String ], buff_len);
+ strecpy(buffer, [ string UTF8String ], last);
return true;
}