Skip to content

Commit

Permalink
fixed strchr vs strrchr bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
emptymonkey committed Jun 12, 2013
1 parent c94d62b commit 72777c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libctty.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ int ctty_stat_parse(int pid, struct proc_stat *stat_info){

stat_info->pid = strtol(scratch, NULL, 10);

if((parse_ptr = strchr(scratch, ')')) == NULL){
if((parse_ptr = strrchr(scratch, ')')) == NULL){
fprintf(stderr, "%s: ctty_stat_parse(): strrchr(%lx, %d): %s\n", program_invocation_short_name, \
(unsigned long) scratch, ')', \
strerror(errno));
Expand Down

0 comments on commit 72777c6

Please sign in to comment.