• R/O
  • HTTP
  • SSH
  • HTTPS

rec10-git: Commit

rec10 git


Commit MetaInfo

Revision11da0cf940527e1f690815e2d332547a58cc51ad (tree)
Zeit2013-12-14 14:58:57
Autorgn64_jp <gn64@rec1...>
Commitergn64_jp

Log Message

tunerec: fix pointer calculation

Ändern Zusammenfassung

Diff

--- a/tunerec/tunerec.c
+++ b/tunerec/tunerec.c
@@ -333,13 +333,13 @@ int main(int argc, char *argv[]) {
333333
334334 if ( channel_freq == 0 ) {
335335 channel_phys = atoi(argv[2] + 2);
336- if ( toupper(argv[2]) == 'T' && toupper(argv[2] + 1) == 'E' && channel_phys != 0 ) {
336+ if ( toupper(*argv[2]) == 'T' && toupper(*(argv[2] + 1)) == 'E' && channel_phys != 0 ) {
337337 channel_freq = ( 473 + (channel_phys - 13) * 6 ) * 1000000 + 142857;
338338 }
339- else if ( toupper(argv[2]) == 'B' && toupper(argv[2] + 1) == 'S' && channel_phys != 0 ) {
339+ else if ( toupper(*argv[2]) == 'B' && toupper(*(argv[2] + 1)) == 'S' && channel_phys != 0 ) {
340340 channel_freq = (channel_phys - 1) * 38360 / 2 + 1049480;
341341 }
342- else if ( toupper(argv[2]) == 'C' && toupper(argv[2] + 1) == 'S' && channel_phys != 0 ) {
342+ else if ( toupper(*argv[2]) == 'C' && toupper(*(argv[2] + 1)) == 'S' && channel_phys != 0 ) {
343343 channel_freq = (channel_phys - 2) * 40000 / 2 + 1613000;
344344 }
345345 fprintf(stderr, "channel_freq = %d\n", channel_freq);
Show on old repository browser