]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/whereami.c
FIX: introduced a bug in luascripts when adding the "safe ascii chars" to ConvertHex...
[proxmark3-svn] / client / whereami.c
index 05f58e25369a9e19f9f355a84491b9c7a284bdb4..a85318895f8dc4dfb07bcd6bcd96ea8287397aa0 100644 (file)
 extern "C" {
 #endif
 
+#if defined(__linux__)
+// make realpath() available:
+#define _DEFAULT_SOURCE
+#endif
+
 #if !defined(WAI_MALLOC) || !defined(WAI_FREE) || !defined(WAI_REALLOC)
 #include <stdlib.h>
 #endif
@@ -135,6 +140,7 @@ int WAI_PREFIX(getExecutablePath)(char* out, int capacity, int* dirname_length)
   return WAI_PREFIX(getModulePath_)(NULL, out, capacity, dirname_length);
 }
 
+/*
 WAI_NOINLINE
 WAI_FUNCSPEC
 int WAI_PREFIX(getModulePath)(char* out, int capacity, int* dirname_length)
@@ -146,8 +152,7 @@ int WAI_PREFIX(getModulePath)(char* out, int capacity, int* dirname_length)
 #pragma warning(push)
 #pragma warning(disable: 4054)
 #endif
-//  if (GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, (LPCTSTR)WAI_RETURN_ADDRESS(), &module))
-       module = GetModuleHandle("proxmark3.exe");
+  if (GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, (LPCTSTR)WAI_RETURN_ADDRESS(), &module))
 #if defined(_MSC_VER)
 #pragma warning(pop)
 #endif
@@ -157,9 +162,9 @@ int WAI_PREFIX(getModulePath)(char* out, int capacity, int* dirname_length)
 
   return length;
 }
+*/
 
 #elif defined(__linux__)
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
Impressum, Datenschutz