Remove strncopy from the core/logic bridge.

This commit is contained in:
David Anderson
2015-08-30 18:21:07 -07:00
parent 3786a2756b
commit a158205f30
10 changed files with 28 additions and 50 deletions
+4 -3
View File
@@ -1,5 +1,5 @@
/**
* vim: set ts=4 :
* vim: set ts=4 sw=4 tw=99 noet :
* =============================================================================
* SourceMod
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
@@ -32,6 +32,7 @@
#include <stdlib.h>
#include "common_logic.h"
#include "CellArray.h"
#include "stringutil.h"
HandleType_t htCellArray;
@@ -181,7 +182,7 @@ static cell_t PushArrayString(IPluginContext *pContext, const cell_t *params)
char *str;
pContext->LocalToString(params[2], &str);
smcore.strncopy((char *)blk, str, array->blocksize() * sizeof(cell_t));
strncopy((char *)blk, str, array->blocksize() * sizeof(cell_t));
return (cell_t)(array->size() - 1);
}
@@ -378,7 +379,7 @@ static cell_t SetArrayString(IPluginContext *pContext, const cell_t *params)
char *str;
pContext->LocalToString(params[3], &str);
return smcore.strncopy((char *)blk, str, array->blocksize() * sizeof(cell_t));
return strncopy((char *)blk, str, array->blocksize() * sizeof(cell_t));
}
static cell_t SetArrayArray(IPluginContext *pContext, const cell_t *params)