Index: /trunk/ChangeLog
===================================================================
--- /trunk/ChangeLog	(revision 594)
+++ /trunk/ChangeLog	(revision 595)
@@ -5,4 +5,5 @@
         o Fixed some issues with SDKS and linking.
     - kmk:
+        o Fixed bug in the sdk walking in kbuild_collect_source_prop.
         o Added --pretty-command-printing for simplifying makefile debugging.
 
Index: /trunk/src/gmake/kbuild.c
===================================================================
--- /trunk/src/gmake/kbuild.c	(revision 594)
+++ /trunk/src/gmake/kbuild.c	(revision 595)
@@ -829,5 +829,5 @@
 
     /* the global sdks */
-    for (iSdk = pSdks->iGlobal; iSdk < pSdks->cGlobal; iSdk++)
+    for (iSdk = pSdks->iGlobal; iSdk < pSdks->iGlobal + pSdks->cGlobal; iSdk++)
     {
         struct variable *pSdk = &pSdks->pa[iSdk];
@@ -863,5 +863,5 @@
 
     /* the target sdks */
-    for (iSdk = pSdks->iTarget; iSdk < pSdks->cTarget; iSdk++)
+    for (iSdk = pSdks->iTarget; iSdk < pSdks->iTarget + pSdks->cTarget; iSdk++)
     {
         struct variable *pSdk = &pSdks->pa[iSdk];
@@ -897,5 +897,5 @@
 
     /* the source sdks */
-    for (iSdk = pSdks->iSource; iSdk < pSdks->cSource; iSdk++)
+    for (iSdk = pSdks->iSource; iSdk < pSdks->iSource + pSdks->cSource; iSdk++)
     {
         struct variable *pSdk = &pSdks->pa[iSdk];
@@ -932,5 +932,5 @@
 
     /* the target + source sdks */
-    for (iSdk = pSdks->iTargetSource; iSdk < pSdks->cTargetSource; iSdk++)
+    for (iSdk = pSdks->iTargetSource; iSdk < pSdks->iTargetSource + pSdks->cTargetSource; iSdk++)
     {
         struct variable *pSdk = &pSdks->pa[iSdk];
