Bump up max number of arguments for client commands from 10 to 50

This commit is contained in:
UnknownShadow200 2020-07-05 22:00:28 +10:00
parent 54a223f691
commit 0046c544f4
4 changed files with 6 additions and 7 deletions

View File

@ -262,8 +262,8 @@ static struct ChatCommand* Commands_FindMatch(const String* cmdName) {
static void Commands_PrintDefault(void) {
String str; char strBuffer[STRING_SIZE];
String name;
struct ChatCommand* cmd;
String name;
Chat_AddRaw("&eList of client commands:");
String_InitArray(str, strBuffer);
@ -288,9 +288,9 @@ static void Commands_Execute(const String* input) {
static const String prefix = String_FromConst(COMMANDS_PREFIX);
String text = *input;
int offset, count;
String args[10];
struct ChatCommand* cmd;
int offset, count;
String args[50];
if (String_CaselessStarts(&text, &prefixSpace)) { /* /client command args */
offset = prefixSpace.length;

View File

@ -111,7 +111,6 @@ void Options_Set(const char* keyRaw, const String* value) {
}
void Options_SetString(const String* key, const String* value) {
int i;
if (!value || !value->length) {
if (!EntryList_Remove(&Options, key, '=')) return;
} else {

View File

@ -650,7 +650,7 @@ static void* ExecThread(void* param) {
void* Thread_Start(Thread_StartFunc func, cc_bool detach) {
pthread_t* ptr = (pthread_t*)Mem_Alloc(1, sizeof(pthread_t), "thread");
int res = pthread_create(ptr, NULL, ExecThread, func);
int res = pthread_create(ptr, NULL, ExecThread, (void*)func);
if (res) Logger_Abort2(res, "Creating thread");
if (detach) Thread_Detach(ptr);

View File

@ -108,8 +108,8 @@ static int Program_Run(int argc, char** argv) {
#ifdef _MSC_VER
/* NOTE: Make sure to comment this out before pushing a commit */
//String rawArgs = String_FromConst("UnknownShadow200 fffff 127.0.0.1 25565");
String rawArgs = String_FromConst("UnknownShadow200");
argsCount = String_UNSAFE_Split(&rawArgs, ' ', args, 4);
//String rawArgs = String_FromConst("UnknownShadow200");
//argsCount = String_UNSAFE_Split(&rawArgs, ' ', args, 4);
#endif
if (argsCount == 0) {