mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2024-11-28 01:54:18 +01:00
Fix win32 cltool.
This commit is contained in:
parent
8e555b8424
commit
5b0ede3239
@ -70,8 +70,8 @@ void PrintUsage() {
|
|||||||
fprintf(stderr, "\t-j <num>\tUse <num> blocks for each work item in a worker queue threading model. Default: (Blocks / Threads)\n");
|
fprintf(stderr, "\t-j <num>\tUse <num> blocks for each work item in a worker queue threading model. Default: (Blocks / Threads)\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExtractBasename(const char *filename, char *buf, int bufSz) {
|
void ExtractBasename(const char *filename, char *buf, size_t bufSz) {
|
||||||
int len = strlen(filename);
|
size_t len = strlen(filename);
|
||||||
const char *end = filename + len;
|
const char *end = filename + len;
|
||||||
const char *ext = end;
|
const char *ext = end;
|
||||||
const char *base = NULL;
|
const char *base = NULL;
|
||||||
@ -83,8 +83,8 @@ void ExtractBasename(const char *filename, char *buf, int bufSz) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int numChars = ext - base + 1;
|
size_t numChars = ext - base + 1;
|
||||||
int toCopy = ::std::min(numChars, bufSz);
|
size_t toCopy = (::std::min)(numChars, bufSz);
|
||||||
memcpy(buf, base, toCopy);
|
memcpy(buf, base, toCopy);
|
||||||
buf[toCopy - 1] = '\0';
|
buf[toCopy - 1] = '\0';
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user