- fixed memory corruption on card initialization

- fixed compilation warning


git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@340 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
frankmorgner
2010-10-26 13:47:23 +00:00
parent 1b34e5e66b
commit a233d19691
3 changed files with 8 additions and 8 deletions

View File

@@ -56,12 +56,12 @@ int initialize(int reader_id, const char *cdriver, int verbose,
*reader = sc_ctx_get_reader(*ctx, i);
if (sc_detect_card_presence(*reader, 0) & SC_SLOT_CARD_PRESENT) {
reader_id = i;
sc_debug(*ctx, "Using reader with a card: %s", (*reader)->name);
sc_debug(*ctx, "Using the first reader with a card: %s", (*reader)->name);
break;
}
}
if (reader_id >= reader_count) {
/* no reader found, use the first */
sc_debug(*ctx, "No card found, using the first reader.");
reader_id = 0;
}
}