dvb_support: don't use negative values for satpos

This commit is contained in:
Jaroslav Kysela 2014-11-04 18:14:45 +01:00
parent ab51ae2f80
commit 8060bbd551

View file

@ -863,7 +863,7 @@ dvb_sat_position_to_str(int position, char *buf, size_t buflen)
return "";
snprintf(buf, buflen, "%d", position / 10);
if (dec)
snprintf(buf + strlen(buf), buflen - strlen(buf), ".%d", dec);
snprintf(buf + strlen(buf), buflen - strlen(buf), ".%d", abs(dec));
snprintf(buf + strlen(buf), buflen - strlen(buf), "%c", dec < 0 ? 'W' : 'E');
return buf;
}