summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2009-04-12 11:49:36 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2009-04-12 11:49:36 +0200
commit480320fe82922296d6c181ddcc95fbf5cf566330 (patch)
treebe77470b892dd3fae623c9f677e7f752a860e283 /src/edit.c
parent062da3696d295e903d2e3e97d225c6794653b597 (diff)
Cylinder is now long unsigned int. Fix a parameter inversion for the DOS version.
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/edit.c b/src/edit.c
index 4ecca70..3b409c4 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -124,7 +124,7 @@ static void interface_editor_position(const disk_t *disk_car,uint64_t *lba)
int done = 0;
char def[LINE_LENGTH];
char response[LINE_LENGTH];
- unsigned int tmp_val;
+ unsigned long int tmp_val;
int command;
position.cylinder=offset2cylinder(disk_car,*lba);
position.head=offset2head(disk_car,*lba);
@@ -145,10 +145,10 @@ static void interface_editor_position(const disk_t *disk_car,uint64_t *lba)
switch (command) {
case 'c':
case 'C':
- sprintf(def, "%u", position.cylinder);
+ sprintf(def, "%lu", position.cylinder);
mvwaddstr(stdscr,INTER_GEOM_Y, INTER_GEOM_X, "Enter the number of cylinders: ");
if (get_string(response, LINE_LENGTH, def) > 0) {
- tmp_val = atoi(response);
+ tmp_val = atol(response);
if (tmp_val < disk_car->geom.cylinders) {
position.cylinder = tmp_val;
} else