mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-21 23:01:03 +00:00
Update capstone from git
This commit is contained in:
parent
5449c8d889
commit
39abb5f89c
@ -10,9 +10,9 @@ CS_VER=3.0
|
||||
CS_TAR=http://capstone-engine.org/download/$(CS_VER)/capstone-$(CS_VER).tgz
|
||||
CS_TAR=
|
||||
CS_URL=$(GIT_PREFIX)github.com/aquynh/capstone.git
|
||||
CS_UPD=20150911
|
||||
CS_UPD=20150923
|
||||
CS_BRA=next
|
||||
CS_TIP=7b714c64dc35cf5fa2f04de49d1858b6ae69f169
|
||||
CS_TIP=839f06e855a38499de82b3014101fa1706fba994
|
||||
# REVERT THIS COMMIT BECAUSE ITS WRONG
|
||||
CS_REV=
|
||||
#21b9b25e9dae4af0ef309d4089a54e53b8f5b479
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git a/include/capstone/platform.h b/include/capstone/platform.h
|
||||
index 1a0f07a..12132f5 100644
|
||||
--- a/include/capstone/platform.h
|
||||
+++ b/include/capstone/platform.h
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef CAPSTONE_PLATFORM_H
|
||||
#define CAPSTONE_PLATFORM_H
|
||||
|
||||
-#if !defined(__MINGW32__) && !defined(__MINGW64__) && (defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64))
|
||||
+#if !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__MINGW64__) && (defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64))
|
||||
// MSVC
|
||||
|
||||
// stdbool.h
|
@ -50,12 +50,16 @@ SDB_API char *sdb_itoa(ut64 n, char *s, int base) {
|
||||
static const char* lookup = "0123456789abcdef";
|
||||
char tmpbuf[64], *os = NULL;
|
||||
const int imax = 62;
|
||||
int i = imax;
|
||||
int i = imax, copy_string = 1;
|
||||
if (s) {
|
||||
*s = 0;
|
||||
} else {
|
||||
os = s = tmpbuf;
|
||||
}
|
||||
if (base < 0) {
|
||||
copy_string = 0;
|
||||
base = -base;
|
||||
}
|
||||
if ((base > 16) || (base < 1))
|
||||
return NULL;
|
||||
if (!n) {
|
||||
@ -77,10 +81,13 @@ SDB_API char *sdb_itoa(ut64 n, char *s, int base) {
|
||||
if (os) {
|
||||
return strdup (s+i+1);
|
||||
}
|
||||
// unnecessary memmove in case we use the return value
|
||||
// return s + i + 1;
|
||||
memmove (s, s+i+1, strlen (s+i+1)+1);
|
||||
return s;
|
||||
if (copy_string) {
|
||||
// unnecessary memmove in case we use the return value
|
||||
// return s + i + 1;
|
||||
memmove (s, s+i+1, strlen (s+i+1)+1);
|
||||
return s;
|
||||
}
|
||||
return s + i + 1;
|
||||
}
|
||||
|
||||
SDB_API ut64 sdb_atoi(const char *s) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user