mirror of
https://github.com/konsoletyper/teavm.git
synced 2024-11-21 01:00:54 +08:00
C: fix initialization code
This commit is contained in:
parent
db911c6623
commit
114ad986e4
@ -466,11 +466,7 @@ char* teavm_char16ToMb(char16_t* javaChars, int32_t length) {
|
||||
}
|
||||
|
||||
TeaVM_Array* teavm_parseArguments(int argc, char** argv) {
|
||||
int arraySize = argc - 1;
|
||||
if (arraySize < 0) {
|
||||
arraySize - 1;
|
||||
}
|
||||
TeaVM_Array* array = teavm_allocateStringArray(arraySize);
|
||||
TeaVM_Array* array = teavm_allocateStringArray(argc > 0 ? argc - 1 : 0);
|
||||
TeaVM_String** arrayData = TEAVM_ARRAY_DATA(array, TeaVM_String*);
|
||||
for (int i = 1; i < argc; ++i) {
|
||||
arrayData[i - 1] = teavm_cToString(argv[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user