lsdvd-0.16-strip-trailing-spaces.patch 326 B

12345678910111213141516
  1. --- lsdvd-0.10/lsdvd.c.jdw 2003-09-30 07:01:00.000000000 +1000
  2. +++ lsdvd-0.10/lsdvd.c 2007-11-10 17:16:17.000000000 +1100
  3. @@ -153,9 +153,9 @@
  4. fclose (filehandle);
  5. - title[32] = '\0';
  6. - while(i-- > 2)
  7. - if(title[i] == ' ') title[i] = '\0';
  8. + while (i > 0 && title[i-1] == ' ')
  9. + i--;
  10. + title[i] = '\0';
  11. return 0;
  12. }