Revisión | cd46489628d656e4a29cb72b930ebe9d5060495d (tree) |
---|---|
Tiempo | 2013-06-11 11:56:04 |
Autor | K.Ohta <whatisthis.sowhat@gmai...> |
Commiter | K.Ohta |
[Tuner] ADD trap of overflow on tuning.
@@ -113,6 +113,8 @@ unsigned int akc6955_set_tune(unsigned char mode_3k, unsigned int ch) | ||
113 | 113 | // BAND=AM && MW2 |
114 | 114 | i = (i / 3) * 3; |
115 | 115 | } |
116 | + if(i < 0) i = 0; | |
117 | + if(i > 0x1fff) i = 0x1fff; | |
116 | 118 | if(mode_3k == 0){ |
117 | 119 | b = ((i >> 8) & 0x1f) | 0x40; // 32.768KHz clock |
118 | 120 | } else { |