shntool-3.0.10-large-times.diff 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. diff -aur shntool-3.0.10-clean/src/core_mode.c shntool-3.0.10/src/core_mode.c
  2. --- shntool-3.0.10-clean/src/core_mode.c 2009-03-30 06:55:33.000000000 +0100
  3. +++ shntool-3.0.10/src/core_mode.c 2012-08-11 16:37:58.000000000 +0100
  4. @@ -310,8 +310,8 @@
  5. if (sec >= 60)
  6. st_error("invalid value for seconds: [%d]",sec);
  7. - bytes = (wlong)(min * info->rate * 60) +
  8. - (wlong)(sec * info->rate);
  9. + bytes = (((wlong)min) * info->rate * 60) +
  10. + (((wlong)sec) * info->rate);
  11. return bytes;
  12. }
  13. @@ -358,9 +358,9 @@
  14. if (frames >= 75)
  15. st_error("invalid value for frames: [%d]",frames);
  16. - bytes = (wlong)(min * CD_RATE * 60) +
  17. - (wlong)(sec * CD_RATE) +
  18. - (wlong)(frames * CD_BLOCK_SIZE);
  19. + bytes = (((wlong)min) * CD_RATE * 60) +
  20. + (((wlong)sec) * CD_RATE) +
  21. + (((wlong)frames) * CD_BLOCK_SIZE);
  22. return bytes;
  23. }
  24. @@ -403,8 +403,8 @@
  25. nearest_byte = (int)((((double)ms * (double)info->rate) / 1000.0) + 0.5);
  26. - bytes = (wlong)(min * info->rate * 60) +
  27. - (wlong)(sec * info->rate);
  28. + bytes = (((wlong)min) * info->rate * 60) +
  29. + (((wlong)sec) * info->rate);
  30. if (PROB_NOT_CD(info)) {
  31. bytes += nearest_byte;