changeset 2123:c349bd73af71

Fixed a bug in cleaning up of module's sample names/title. (Sometimes caused the last character to be deleted.)
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 24 Oct 2007 07:32:18 +0300
parents 1be75b01ded3
children b8da6a0b0da2
files src/modplug/sndfile.cxx
diffstat 1 files changed, 1 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/modplug/sndfile.cxx	Tue Oct 23 09:06:07 2007 +0300
+++ b/src/modplug/sndfile.cxx	Wed Oct 24 07:32:18 2007 +0300
@@ -174,12 +174,7 @@
 		LPSTR p = m_szNames[i];
 		int j = 31;
 		p[j] = 0;
-		while ((j>=0) && (p[j]<=' ')) p[j--] = 0;
-		while (j>=0)
-		{
-			if (((BYTE)p[j]) < ' ') p[j] = ' ';
-			j--;
-		}
+		while ((j >= 0) && (p[j] == ' ')) p[j--] = 0;
 	}
 	// Adjust channels
 	for (i=0; i<MAX_BASECHANNELS; i++)