From 49bfcf43817fb7d36f168ef2ba992b652747e0b2 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Wed, 3 Aug 2011 11:43:16 +0200 Subject: [multiple changes] 2011-08-03 Pascal Obry * makeutl.adb: Minor reformatting. 2011-08-03 Vincent Celier * fname-uf.adb (Get_File_Name) If the file cannot be found when there are no config pragmas file and May_Fail is True, return No_File instead of the file name, to be consistent. 2011-08-03 Pascal Obry * adaint.c (__gnat_is_executable_file_attr): Avoid access to null pointer. 2011-08-03 Javier Miranda * sem_ch13.adb (Same_Representation): In VM targets the representation of arrays with aliased components differs from arrays with non-aliased components. From-SVN: r177251 --- gcc/ada/adaint.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/ada/adaint.c') diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index 6845ff0..3d4c50a 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -2149,7 +2149,8 @@ __gnat_is_executable_file_attr (char* name, struct file_attributes* attr) TCHAR *l, *last = _tcsstr(wname, _T(".exe")); /* look for last .exe */ - while (l = _tcsstr(last+1, _T(".exe"))) last = l; + if (last) + while (l = _tcsstr(last+1, _T(".exe"))) last = l; attr->executable = GetFileAttributes (wname) != INVALID_FILE_ATTRIBUTES && last - wname == (int) (_tcslen (wname) - 4); -- cgit v1.1