spion / adbfs-rootless

Mount Android phones on Linux with adb. No root required.
Other
890 stars 73 forks source link

Fix exec_command's newline cleanup #40

Closed rgson closed 5 years ago

rgson commented 5 years ago

The precedence of && is higher than ||, leading to the \r check being evaluated even on zero-length strings (against string index -1). Explicitly grouping the \n and \r checks prevents this.

spion commented 5 years ago

Thanks!