cleitonsouza01 / logkeys

Automatically exported from code.google.com/p/logkeys
Other
0 stars 0 forks source link

infinite loop #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. install
2. run "logkeys -s"

the Code is stuck in an infinite loop at around line 305
      index = line.find("U+", 0);
      while ((unsigned int) index != std::string::npos) {
        line[index] = '0'; line[index + 1] = 'x';
        index = line.find("U+", index);
      }

When I printed index I get "-1". which is part of the problem.

Original issue reported on code.google.com by brain...@gmail.com on 6 May 2010 at 11:26

GoogleCodeExporter commented 9 years ago
by while loop to

index = line.find("U+", 0);
while ((index != -1) && ((unsigned int) index != std::string::npos)) {
   line[index] = '0'; line[index + 1] = 'x';
   index = line.find("U+", index);
}

I fixed the problem
I am using ubuntu 10.04 and that might be the issue

Original comment by brain...@gmail.com on 6 May 2010 at 11:32

GoogleCodeExporter commented 9 years ago
Hi

Thanks for reporting. This bug is actually a known issue, a duplicate of issue 
1.
The perpetrator is a 64-bit OS.
The bug has been fixed in the repository and is waiting for release, which is
scheduled soon.

Glad you found a workaround by yourself. :)

Original comment by kernc...@gmail.com on 7 May 2010 at 9:15