Fix check for PROC_QUOTES mode
Since != has priority over &, the "if ((mode&PROC_QUOTES != 0))" check is the same as "if (mode & (PROC_QUOTES!=0))" - not what the code intends. Change-Id: I14840a887f26c28f2bd0aee8704c79cf353164ad Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
This commit is contained in:
@@ -719,7 +719,7 @@ jboolean android_os_Process_parseProcLineArray(JNIEnv* env, jobject clazz,
|
||||
jint mode = formatData[fi];
|
||||
if ((mode&PROC_PARENS) != 0) {
|
||||
i++;
|
||||
} else if ((mode&PROC_QUOTES != 0)) {
|
||||
} else if ((mode&PROC_QUOTES) != 0) {
|
||||
if (buffer[i] == '"') {
|
||||
i++;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user