Changeset - 725319a064ef
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 16 years ago 2009-10-13 23:07:18
ohnobinki@ohnopublishing.net
fixed bad scanf and getline interaction
1 file changed with 7 insertions and 7 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -984,15 +984,15 @@ int main(int argc, char *argv[])
 
      submitter = NULL;
 
      email = NULL;
 

	
 
      fprintf(stderr, "\nType: \n\t 1 \t blender\n\t 2 \t povray\n"); scanf("%d\n", &type);
 
      fprintf(stderr, "\nName: ");                     getline(&name, &read_buf, stdin);
 
      fprintf(stderr, "\nType: \n\t 1 \t blender\n\t 2 \t povray\n"); scanf("%d", &type);
 
      fprintf(stderr, "\nName: ");        scanf("\n"); getline(&name, &read_buf, stdin);
 
      fprintf(stderr, "\nSubmitter: ");                getline(&submitter, &read_buf, stdin);
 
      fprintf(stderr, "\nEmail: ");                    getline(&email, &read_buf, stdin);
 
      fprintf(stderr, "\nPriority: ");                 scanf("%d\n", &priority);
 
      fprintf(stderr, "\nStart frame: ");              scanf("%d\n", &start_frame);
 
      fprintf(stderr, "\nEnd frame: ");                scanf("%d\n", &end_frame);
 
      fprintf(stderr, "\nWidth: ");                    scanf("%d\n", &width);
 
      fprintf(stderr, "\nHeight: ");                   scanf("%d\n", &height);
 
      fprintf(stderr, "\nPriority: ");                 scanf("%d", &priority);
 
      fprintf(stderr, "\nStart frame: ");              scanf("%d", &start_frame);
 
      fprintf(stderr, "\nEnd frame: ");                scanf("%d", &end_frame);
 
      fprintf(stderr, "\nWidth: ");                    scanf("%d", &width);
 
      fprintf(stderr, "\nHeight: ");                   scanf("%d", &height);
 
      prepare_distrenjob(&head, type, name, submitter, email, priority, start_frame, end_frame, width, height);
 
      break;
 
    case 5:
0 comments (0 inline, 0 general)