]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
CHG: adjusted two arrays in scripting.c to mirror the added models in reveng 1.4.0
authoriceman1001 <iceman@iuse.se>
Tue, 5 Apr 2016 02:43:54 +0000 (04:43 +0200)
committericeman1001 <iceman@iuse.se>
Tue, 5 Apr 2016 02:43:54 +0000 (04:43 +0200)
client/reveng/reveng.h
client/scripting.c

index 60b3f4db923f377b5dfa3a81c0f68954f36290b5..17ab20734278a53a116f89c8ee6099ea3a3e45bb 100644 (file)
@@ -1,9 +1,9 @@
 /* reveng.h
- * Greg Cook, 30/Jul/2015
+ * Greg Cook, 24/Feb/2016
  */
 
 /* CRC RevEng, an arbitrary-precision CRC calculator and algorithm finder
- * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015  Gregory Cook
+ * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016  Gregory Cook
  *
  * This file is part of CRC RevEng.
  *
@@ -92,7 +92,7 @@
 /* Global definitions */
 
 /* CRC RevEng version string */
-#define VERSION "1.3.1"
+#define VERSION "1.4.0"
 
 /* bmpbit.c */
 typedef BMP_T bmp_t;
@@ -162,8 +162,6 @@ extern int pmpar(const poly_t poly, const poly_t mask);
 extern int pident(const poly_t a, const poly_t b);
 
 /* model.c */
-#define M_OVERWR   256
-
 typedef struct {
        poly_t spoly;           /* polynomial with highest-order term removed. length determines CRC width */
        poly_t init;            /* initial register value. length == poly.length */
@@ -176,17 +174,21 @@ typedef struct {
 extern void mcpy(model_t *dest, const model_t *src);
 extern void mfree(model_t *model);
 extern int mcmp(const model_t *a, const model_t *b);
-extern int mbynam(model_t *dest, const char *key);
-extern void mbynum(model_t *dest, int num);
-extern int mcount(void);
-extern char *mnames(void);
 extern char *mtostr(const model_t *model);
-extern void mmatch(model_t *model, int flags);
 extern void mcanon(model_t *model);
 extern void mcheck(model_t *model);
 extern void mrev(model_t *model);
 extern void mnovel(model_t *model);
 
+/* preset.c */
+#define M_OVERWR   256
+
+extern int mbynam(model_t *dest, const char *key);
+extern void mbynum(model_t *dest, int num);
+extern int mcount(void);
+extern char *mnames(void);
+extern void mmatch(model_t *model, int flags);
+
 /* reveng.c */
 #define R_HAVEP    512
 #define R_HAVEI   1024
index aae8c3ca6845ff09f281373ec3cbf03dd4e91122..5189f59a686b56dfd69f79d7db88fe8f33c0a5d8 100644 (file)
@@ -407,13 +407,15 @@ static int l_sha1(lua_State *L)
 
 static int l_reveng_models(lua_State *L){
 
-       char *models[80];
+       // This array needs to be adjusted if RevEng adds more crc-models.
+       char *models[100];
        int count = 0;
        int in_width = luaL_checkinteger(L, 1);
        
        if( in_width > 89 ) return returnToLuaWithError(L,"Width cannot exceed 89, got %d", in_width);
 
-       uint8_t width[80];
+       // This array needs to be adjusted if RevEng adds more crc-models.
+       uint8_t width[100];
        width[0] = (uint8_t)in_width;
        int ans = GetModels(models, &count, width);
        if (!ans) return 0;
Impressum, Datenschutz