Merge to XFA: Use stdint.h types throughout PDFium.
[pdfium.git] / xfa / include / fwl / core / fwl_error.h
index 4bd2ae4..465808a 100644 (file)
@@ -6,7 +6,7 @@
 \r
 #ifndef _FWL_ERROR_H\r
 #define _FWL_ERROR_H\r
-typedef FX_INT32       FWL_ERR;\r
+typedef int32_t        FWL_ERR;\r
 #define FWL_ERR_Succeeded                                              0\r
 #define FWL_ERR_Indefinite                                             -1\r
 #define FWL_ERR_Parameter_Invalid                              -100\r
@@ -29,8 +29,9 @@ typedef FX_INT32      FWL_ERR;
     { \\r
         if ((arg) != FWL_ERR_Succeeded) \\r
         { \\r
-            char buf[16]; \\r
-            sprintf(buf, "Error code is %d\n", arg); \\r
+            char buf[36]; \\r
+            memset(buf, 0, sizeof(buf)); \\r
+            FXSYS_snprintf(buf, sizeof(buf) - 1, "Error code is %d\n", arg); \\r
             ::OutputDebugString(buf); \\r
         } \\r
     }\r