mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
C: fix compilation in Linux
This commit is contained in:
parent
9642eeec0a
commit
00ca2c1064
|
@ -59,8 +59,9 @@ int32_t teavm_file_workDirectory(char16_t** result) {
|
|||
}
|
||||
|
||||
int32_t teavm_file_tempDirectory(char16_t** result) {
|
||||
static const char16_t tmp[] = u"/tmp";
|
||||
*result = malloc(sizeof(tmp));
|
||||
static const char16_t string[] = u"/tmp";
|
||||
char16_t* copy = malloc(sizeof(string));
|
||||
*result = copy;
|
||||
int32_t i = 0;
|
||||
while (string[i] != 0) {
|
||||
copy[i] = string[i];
|
||||
|
|
Loading…
Reference in New Issue
Block a user