]> khamidou — GitHub mirrors - electron.git/commitdiff
snprintf is not supported by VS.
authorCheng Zhao <zcbenz@gmail.com>
Mon, 1 Jul 2013 13:47:21 +0000 (21:47 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Mon, 1 Jul 2013 13:47:21 +0000 (21:47 +0800)
common/api/atom_extensions.cc

index ff6caa940de6f92eaea961a662653dce04f0050b..c587c0718757394a9d8bf7b9a072befd2fa5c0a4 100644 (file)
@@ -5,6 +5,7 @@
 #include <string.h>
 #include <stdio.h>
 
+#include "base/string_util.h"
 #include "vendor/node/src/node.h"
 #include "vendor/node/src/node_version.h"
 
@@ -35,10 +36,10 @@ node::node_module_struct* GetBuiltinModule(const char *name, bool is_browser) {
   char common[128];
   char spec[128];
   node::node_module_struct *cur = NULL;
-  snprintf(common, sizeof(common), "atom_common_%s", name);
-  snprintf(spec, sizeof(spec),
-           (is_browser ? "atom_browser_%s": "atom_renderer_%s"),
-           name);
+  base::snprintf(common, sizeof(common), "atom_common_%s", name);
+  base::snprintf(spec, sizeof(spec),
+                 (is_browser ? "atom_browser_%s": "atom_renderer_%s"),
+                 name);
   /* TODO: you could look these up in a hash, but there are only
    * a few, and once loaded they are cached. */
   for (int i = 0; node_module_list[i] != NULL; i++) {