mirror of
https://github.com/factoriotools/factorio-docker.git
synced 2025-10-21 13:19:15 +02:00
Compare commits
1 Commits
fix-arm64-
...
fix/rcon-i
Author | SHA1 | Date | |
---|---|---|---|
|
4f551b4215 |
@@ -1,3 +1,4 @@
|
|||||||
|
#define _GNU_SOURCE
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@@ -107,7 +108,8 @@ char* read_password(const char* conf_dir) {
|
|||||||
fseek(fptr, 0, SEEK_SET); /* same as rewind(f); */
|
fseek(fptr, 0, SEEK_SET); /* same as rewind(f); */
|
||||||
|
|
||||||
char *password = malloc(fsize + 1);
|
char *password = malloc(fsize + 1);
|
||||||
fread(password, fsize, 1, fptr);
|
size_t bytes_read = fread(password, fsize, 1, fptr);
|
||||||
|
(void)bytes_read; // Suppress unused warning
|
||||||
fclose(fptr);
|
fclose(fptr);
|
||||||
|
|
||||||
password[fsize] = 0;
|
password[fsize] = 0;
|
||||||
|
Reference in New Issue
Block a user