]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/emv/emv_tags.c
Fix some printf/scanf format strings
[proxmark3-svn] / client / emv / emv_tags.c
index 02b039f85568a96b62838a86dfab7080b906dd0b..0dc635170a03487e4bcb5b53e123dc466b63df8a 100644 (file)
@@ -400,7 +400,7 @@ static void emv_tag_dump_numeric(const struct tlv *tlv, const struct emv_tag *ta
 static void emv_tag_dump_yymmdd(const struct tlv *tlv, const struct emv_tag *tag, FILE *f, int level)
 {
        PRINT_INDENT(level);
-       fprintf(f, "\tDate: 20%02ld.%ld.%ld\n",
+       fprintf(f, "\tDate: 20%02lu.%lu.%lu\n",
                        emv_value_numeric(tlv, 0, 2),
                        emv_value_numeric(tlv, 2, 4),
                        emv_value_numeric(tlv, 4, 6));
@@ -686,3 +686,17 @@ bool emv_tag_dump(const struct tlv *tlv, FILE *f, int level)
 
        return true;
 }
+
+char *emv_get_tag_name(const struct tlv *tlv)
+{
+       static char *defstr = "";
+       
+       if (!tlv) 
+               return defstr;
+
+       const struct emv_tag *tag = emv_get_tag(tlv);
+       if (tag)
+               return tag->name;
+       
+       return defstr;
+}
Impressum, Datenschutz