Thread: Winamp 5.55 SDK
View Single Post
Old 4th January 2007, 17:31   #34
Ben Allison
Former Winamp Developer
Benski's Avatar
Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
Originally posted by abu
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:

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?
I fixed this bug internally in 5.3x, here's an updated (but still beta) SDK -
Benski is offline   Reply With Quote