summaryrefslogtreecommitdiff
path: root/Xenogears/reinsert.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Xenogears/reinsert.cpp')
-rw-r--r--Xenogears/reinsert.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/Xenogears/reinsert.cpp b/Xenogears/reinsert.cpp
index 1227fcc..440e444 100644
--- a/Xenogears/reinsert.cpp
+++ b/Xenogears/reinsert.cpp
@@ -113,8 +113,7 @@ int process_def_file(Handle * f_def)
title = t;
*f_def >> t;
- if (sscanf(t.to_charp(), "%lu\n", &iso_size) != 1)
- return 1;
+ iso_size = t.to_int();
printm(M_INFO, "Read iso size: %lu bytes\n", iso_size);
*f_def >> t;
@@ -122,14 +121,12 @@ int process_def_file(Handle * f_def)
prefix = t;
*f_def >> t;
- if (sscanf(t.to_charp(), "%u\n", &nb_records) != 1)
- return 1;
+ nb_records = t.to_int();
printm(M_INFO, "Read total of records: %u\n", nb_records);
while (1) {
*f_def >> t;
- if (sscanf(t.to_charp(), "%u\n", &n) != 1)
- return 1;
+ n = t.to_int();
if (!n) {
if (sum == nb_records) {
printm(M_INFO, "Definition file seems coherent\n");
@@ -145,8 +142,7 @@ int process_def_file(Handle * f_def)
*f_def >> t;
sequences[nb_seqs].prefix = t;
*f_def >> t;
- if (sscanf(t.to_charp(), "%u\n", &n) != 1)
- return 1;
+ n = t.to_int();
sequences[nb_seqs].type = n;
*f_def >> t;
sequences[nb_seqs].name = t;