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);
|
strcpy(result, prefix);
|
||||||
for(int i = 0; i < len; i++) {
|
for(int i = 0; i < len; i++) {
|
||||||
if(cp_array[i]) {
|
if(cp_array[i]) {
|
||||||
strcat(result, cp_array[i]);
|
if (i > 0)
|
||||||
if (i < (len - 1))
|
|
||||||
strcat(result, ":");
|
strcat(result, ":");
|
||||||
|
strcat(result, cp_array[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf("construct_classpath: returning >%s<\n", result);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user