Author: spetreolle
Date: Sat Apr 4 20:33:18 2015
New Revision: 67053
URL: http://svn.reactos.org/svn/reactos?rev=67053&view=rev
Log:
[FREELDR]
In a quest to better registry,
don't break VSSolution builds.
freeldr_pe is not in the same directory and copy doesn't care if you ask to concatenate C:\tomatoes, it already has the first file.
Modified:
trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt
Modified: trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/CMake…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] Sat Apr 4 20:33:18 2015
@@ -226,10 +226,13 @@
add_dependencies(freeldr_pe asm)
add_dependencies(freeldr_pe_dbg asm)
+# Retrieve the full path to the generated file of the 'freeldr_pe' target
+get_target_property(_freeldr_pe_output_file freeldr_pe LOCATION)
+
concatenate_files(
${CMAKE_CURRENT_BINARY_DIR}/freeldr.sys
${CMAKE_CURRENT_BINARY_DIR}/frldr16.bin
- ${CMAKE_CURRENT_BINARY_DIR}/freeldr_pe.dll)
+ ${_freeldr_pe_output_file})
add_custom_target(freeldr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/freeldr.sys)
@@ -240,7 +243,8 @@
concatenate_files(
${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys
${CMAKE_CURRENT_BINARY_DIR}/frldr16.bin
- ${CMAKE_CURRENT_BINARY_DIR}/freeldr_pe.dll)
+ ${_freeldr_pe_output_file})
add_custom_target(setupldr ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys)
add_cd_file(TARGET setupldr FILE ${CMAKE_CURRENT_BINARY_DIR}/setupldr.sys DESTINATION loader NO_CAB FOR bootcd regtest)
+
Author: hbelusca
Date: Sat Apr 4 14:59:03 2015
New Revision: 67048
URL: http://svn.reactos.org/svn/reactos?rev=67048&view=rev
Log:
[CMD]: Addendum to r67013: Check whether len > 0 before decrementing it in case we point to a newline. Fix some spurious crashes and should fix some other cmd_winetests.
Modified:
trunk/reactos/base/shell/cmd/console.c
Modified: trunk/reactos/base/shell/cmd/console.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/console.c?r…
==============================================================================
--- trunk/reactos/base/shell/cmd/console.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/console.c [iso-8859-1] Sat Apr 4 14:59:03 2015
@@ -179,7 +179,7 @@
/* Loop until we find a \r or \n character */
// FIXME: What about the pair \r\n ?
p = str;
- while (*(PWCHAR)p != L'\r' && *(PWCHAR)p != L'\n' && len > 0)
+ while (len > 0 && *(PWCHAR)p != L'\r' && *(PWCHAR)p != L'\n')
{
/* Advance one character */
p = (PVOID)((PWCHAR)p + 1);
@@ -191,7 +191,7 @@
WriteFile(hOutput, str, dwNumBytes, &dwNumBytes, NULL);
/* If we hit \r or \n ... */
- if (*(PWCHAR)p == L'\r' || *(PWCHAR)p == L'\n')
+ if (len > 0 && (*(PWCHAR)p == L'\r' || *(PWCHAR)p == L'\n'))
{
/* ... send a carriage-return + newline sequence and skip \r or \n */
WriteFile(hOutput, L"\r\n", 2 * sizeof(WCHAR), &dwNumBytes, NULL);
@@ -229,7 +229,7 @@
/* Loop until we find a \r or \n character */
// FIXME: What about the pair \r\n ?
p = str;
- while (*(PCHAR)p != '\r' && *(PCHAR)p != '\n' && len > 0)
+ while (len > 0 && *(PCHAR)p != '\r' && *(PCHAR)p != '\n')
{
/* Advance one character */
p = (PVOID)((PCHAR)p + 1);
@@ -241,7 +241,7 @@
WriteFile(hOutput, str, dwNumBytes, &dwNumBytes, NULL);
/* If we hit \r or \n ... */
- if (*(PCHAR)p == '\r' || *(PCHAR)p == '\n')
+ if (len > 0 && (*(PCHAR)p == '\r' || *(PCHAR)p == '\n'))
{
/* ... send a carriage-return + newline sequence and skip \r or \n */
WriteFile(hOutput, "\r\n", 2, &dwNumBytes, NULL);