diff --git a/src/linux.cc b/src/linux.cc index 791660b7..30536778 100644 --- a/src/linux.cc +++ b/src/linux.cc @@ -2088,7 +2088,7 @@ void get_battery_short_status(char *buffer, unsigned int n, const char *bat) memmove(buffer + 1, buffer + 5, n - 5); } else if (0 != strncmp("AC", buffer, 2)) { buffer[0] = 'U'; - memmove(buffer + 1, buffer + 11, n - 11); + memmove(buffer + 1, buffer + 2, n - 2); } }