Thread: Winamp 5.55 SDK
View Single Post
Old 16th December 2006, 18:38   #32
abu
mlipod moderator
(Senior Member)
 
abu's Avatar
 
Join Date: Jun 2005
Location: Germany
Posts: 3,457
I think I found a bug in this SDK. There was a subtle change in ml_lib.cpp, which was wrong as far as I can see:

code:
diff U3w D:\down\Winamp\SDK\gen_ml\ml_lib.cpp C:\Program Files\Winamp SDK\gen_ml\ml_lib.cpp
--- D:\down\Winamp\SDK\gen_ml\ml_lib.cpp Thu Aug 19 17:52:36 2004
+++ C:\Program Files\Winamp SDK\gen_ml\ml_lib.cpp Tue Feb 14 22:46:16 2006
@@ -116,7 +116,7 @@
{
if (!stricmp(item->extended_info[x],name))
{
- if (strlen(value)>strlen(item->extended_info[x]+strlen(name)+1))
+ if (strlen(value)>strlen(item->extended_info[x])+strlen(name)+1)
{
...


As you see, the braces have been moved. But the old version was right: We want to compare the length of the new value to that of the old value. And that can be found at address "item->extended_info[x]+strlen(name)+1". In the new version, we compare the length of the new value with the length of the name (at item->extended_info[x]), plus again the length of the name, plus 1. Makes no sense, right?

WinAmp Pro 5.5 with ml_iPod 3.10 + dev.patches (download it)
ml_iPod documentation Wiki - ml_iPod FAQ - search ml_iPod forum - iPhone/iTouch - Found a bug?
Donations to support the ml_iPod project can be done HERE
abu is offline   Reply With Quote