You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
src/main-executable/main.c: fix possible stray : at the end of classpath
apparently this can cause a crash in art
This commit is contained in:
@@ -59,12 +59,14 @@ char *construct_classpath(char *prefix, char **cp_array, size_t len)
|
||||
strcpy(result, prefix);
|
||||
for(int i = 0; i < len; i++) {
|
||||
if(cp_array[i]) {
|
||||
strcat(result, cp_array[i]);
|
||||
if (i < (len - 1))
|
||||
if (i > 0)
|
||||
strcat(result, ":");
|
||||
strcat(result, cp_array[i]);
|
||||
}
|
||||
}
|
||||
|
||||
printf("construct_classpath: returning >%s<\n", result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user