Skip to content

Commit

Permalink
Merge pull request MarlinFirmware#1017 from foosel/fix/checksum_trunc…
Browse files Browse the repository at this point in the history
…ation_bug

Fix for a wrong checksum truncation for certain commands
  • Loading branch information
daid committed Jul 24, 2014
2 parents aacff0d + 2d22902 commit c13a831
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1730,7 +1730,7 @@ void process_commands()
case 23: //M23 - Select file
starpos = (strchr(strchr_pointer + 4,'*'));
if(starpos!=NULL)
*(starpos-1)='\0';
*(starpos)='\0';
card.openFile(strchr_pointer + 4,true);
break;
case 24: //M24 - Start SD print
Expand All @@ -1753,7 +1753,7 @@ void process_commands()
if(starpos != NULL){
char* npos = strchr(cmdbuffer[bufindr], 'N');
strchr_pointer = strchr(npos,' ') + 1;
*(starpos-1) = '\0';
*(starpos) = '\0';
}
card.openFile(strchr_pointer+4,false);
break;
Expand All @@ -1768,7 +1768,7 @@ void process_commands()
if(starpos != NULL){
char* npos = strchr(cmdbuffer[bufindr], 'N');
strchr_pointer = strchr(npos,' ') + 1;
*(starpos-1) = '\0';
*(starpos) = '\0';
}
card.removeFile(strchr_pointer + 4);
}
Expand All @@ -1790,7 +1790,7 @@ void process_commands()
namestartpos++; //to skip the '!'

if(starpos!=NULL)
*(starpos-1)='\0';
*(starpos)='\0';

bool call_procedure=(code_seen('P'));

Expand All @@ -1813,7 +1813,7 @@ void process_commands()
if(starpos != NULL){
char* npos = strchr(cmdbuffer[bufindr], 'N');
strchr_pointer = strchr(npos,' ') + 1;
*(starpos-1) = '\0';
*(starpos) = '\0';
}
card.openLogFile(strchr_pointer+5);
break;
Expand Down Expand Up @@ -2233,7 +2233,7 @@ void process_commands()
case 117: // M117 display message
starpos = (strchr(strchr_pointer + 5,'*'));
if(starpos!=NULL)
*(starpos-1)='\0';
*(starpos)='\0';
lcd_setstatus(strchr_pointer + 5);
break;
case 114: // M114
Expand Down

0 comments on commit c13a831

Please sign in to comment.