Ver código fonte

UI: Prevent format-truncation compiler warning

Variables path and dir with the same declared size triggers a compiler
warning about possible truncation. Although, depending on the path
where profiles are stored, its still possible to go beyong the declared
size and the path will be invalid. This will not trigger any
compilation warning and all invalid paths will be cought by the already
check in the os_glob function.
Shaolin 7 anos atrás
pai
commit
b5ee8a9a5d
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      UI/window-basic-main-profiles.cpp

+ 1 - 1
UI/window-basic-main-profiles.cpp

@@ -143,7 +143,7 @@ static bool GetProfileName(QWidget *parent, std::string &name,
 static bool CopyProfile(const char *fromPartial, const char *to)
 {
 	os_glob_t *glob;
-	char path[512];
+	char path[514];
 	char dir[512];
 	int ret;