João Valverde wrote:

      if (!g_file_get_contents(list, &contents, NULL, NULL))
          return;
-    for (arg = strtok(contents, " \n"); arg != NULL; arg = strtok(NULL, " 
\n")) {
+    for (arg = strtok(contents, " \r\n"); arg != NULL; arg = strtok(NULL, " 
\r\n")) {
          scan_file(arg, protos, handoffs);
      }
      g_free(contents);


The newline was only being used on Unixes as the last character in a space-separated string (so that wasn't an issue) but now the token has been changed to newlines on all platforms and your reminder was helpful. Thanks.

But now this has changed this into 'strtok(SEP)' i.e. "\r\n".
Why not " \r\n" (Win32) and " \n" (else-where)? I don't see any
files with spaces in them. And hope they will never show up...

Since for some weird reason that response-file had some extra
spaces (maybe a Cmake issue?).

--
--gv
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
            mailto:[email protected]?subject=unsubscribe

Reply via email to