Fix a tiny bug that could cause a crash

This commit is contained in:
Richard Hughes 2009-07-03 16:56:44 +01:00
parent fec78d3fbb
commit ec0023c347

View file

@ -175,8 +175,8 @@ dkp_backlight_set_brightness (DkpBacklight *backlight, guint value, DBusGMethodI
}
/* write chunk */
len = strlen (value_text);
value_text = g_strdup_printf ("%u", value);
len = strlen (value_text);
egg_debug ("Writing '%s' to '%s'", value_text, path);
wrote = write (fd, value_text, len);
if (wrote < len) {