Fixed allocation of 16x16 icons.

diff --git a/objects/cursoricon.c b/objects/cursoricon.c
index 6d64d18..bc5914e 100644
--- a/objects/cursoricon.c
+++ b/objects/cursoricon.c
@@ -868,7 +868,7 @@
         }
         else
         {
-            int iTargetCX, iTargetCY;
+            int iTargetCY = iDesiredCY, iTargetCX = iDesiredCX;
             LPBYTE pBits;
             HANDLE hMem;
             HRSRC hRsrc;
@@ -936,8 +936,11 @@
 
             pBits = (LPBYTE)LockResource( hMem );
          
-            iTargetCY = GetSystemMetrics(SM_CYICON);
-            iTargetCX = GetSystemMetrics(SM_CXICON);
+	    if(nFlags & LR_DEFAULTSIZE)
+	    {
+	        iTargetCY = GetSystemMetrics(SM_CYICON);
+                iTargetCX = GetSystemMetrics(SM_CXICON);
+	    }
 
             /* Create a New Icon with the proper dimension
             */