Skip to content

Commit

Permalink
also write the null byte
Browse files Browse the repository at this point in the history
  • Loading branch information
anzz1 authored May 5, 2023
1 parent fa388fb commit 75c257b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/keymon/keymon.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void checkAXP() {
if (bat_fd>0) {
char value[4];
sprintf(value, "%d", battery_number);
write(bat_fd, value, strlen(value));
write(bat_fd, value, strlen(value)+1);
close(bat_fd);
}
}
Expand Down

0 comments on commit 75c257b

Please sign in to comment.