mirror of
https://github.com/javalsai/lidm.git
synced 2026-02-27 12:00:44 +01:00
Compare commits
2 Commits
8e9a222908
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
15b8089e37
|
|||
|
|
dd6760127c |
@@ -4,6 +4,10 @@
|
|||||||
<!-- By "very relevant" I mean big features or something manual packagers should know, like leftover files -->
|
<!-- By "very relevant" I mean big features or something manual packagers should know, like leftover files -->
|
||||||
<!-- Once a release would be opened, group the last bunch of dangling changes, add release version as header and its date -->
|
<!-- Once a release would be opened, group the last bunch of dangling changes, add release version as header and its date -->
|
||||||
|
|
||||||
|
# 2.0.2
|
||||||
|
|
||||||
|
- fix off-by-one error with launch state save
|
||||||
|
|
||||||
# 2.0.1
|
# 2.0.1
|
||||||
|
|
||||||
- source and header files can be nested in `src/` and `include/`
|
- source and header files can be nested in `src/` and `include/`
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -1,4 +1,4 @@
|
|||||||
VERSION := 2.0.1
|
VERSION := 2.0.2
|
||||||
.DEFAULT_GOAL := lidm
|
.DEFAULT_GOAL := lidm
|
||||||
|
|
||||||
CDIR = src
|
CDIR = src
|
||||||
|
|||||||
@@ -22,16 +22,16 @@ int read_launch_state(struct LaunchState* NNULLABLE state) {
|
|||||||
|
|
||||||
size_t num = 0;
|
size_t num = 0;
|
||||||
ssize_t chars = getline(&state->username, &num, state_fd);
|
ssize_t chars = getline(&state->username, &num, state_fd);
|
||||||
if (chars < 0) goto fail;
|
if (chars <= 0) goto fail;
|
||||||
if (state->username[chars] == '\n') state->username[chars] = 0;
|
if (state->username[chars - 1] == '\n') state->username[chars - 1] = 0;
|
||||||
|
|
||||||
num = 0;
|
num = 0;
|
||||||
chars = getline(&state->session_opt, &num, state_fd);
|
chars = getline(&state->session_opt, &num, state_fd);
|
||||||
if (chars < 0) {
|
if (chars <= 0) {
|
||||||
free(state->session_opt);
|
free(state->session_opt);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
if (state->session_opt[chars] == '\n') state->session_opt[chars] = 0;
|
if (state->session_opt[chars - 1] == '\n') state->session_opt[chars - 1] = 0;
|
||||||
|
|
||||||
(void)fclose(state_fd);
|
(void)fclose(state_fd);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user