Module: wine
Branch: stable
Commit: d551678d79fb0d51b3d719df83e4d39368394a9d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d551678d79fb0d51b3d719df8…
Author: Bruno Jesus <00cpxxx(a)gmail.com>
Date: Tue Jan 31 04:16:17 2017 -0200
winealsa.drv: Fix handling of system real time MIDI messages.
Signed-off-by: Bruno Jesus <00cpxxx(a)gmail.com>
Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
(cherry picked from commit 53454ce9359f4ec485aa9411a0e9b14e3d1ed0fa)
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/winealsa.drv/midi.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/dlls/winealsa.drv/midi.c b/dlls/winealsa.drv/midi.c
index 6fc75ee..6ef1976 100644
--- a/dlls/winealsa.drv/midi.c
+++ b/dlls/winealsa.drv/midi.c
@@ -909,10 +909,15 @@ static DWORD modData(WORD wDevID, DWORD dwParam)
case 0x0B: /* Continue */
case 0x0C: /* Stop */
case 0x0E: /* Active Sensing. */
- /* FIXME: Is this function suitable for these purposes
- (and also Song Select and Song Position Pointer) */
- snd_seq_ev_set_sysex(&event, 1, &evt);
+ {
+ snd_midi_event_t *midi_event;
+
+ snd_midi_event_new(1, &midi_event);
+ snd_midi_event_init(midi_event);
+ snd_midi_event_encode_byte(midi_event, evt, &event);
+ snd_midi_event_free(midi_event);
break;
+ }
case 0x0F: /* Reset */
/* snd_seq_ev_set_sysex(&event, 1, &evt);
this other way may be better */
Module: wine
Branch: stable
Commit: b098b31b85474524a58cb7dcb34bc4ed0fbb6b76
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b098b31b85474524a58cb7dcb…
Author: Jacob Lifshay <programmerjake(a)gmail.com>
Date: Thu Feb 9 16:26:36 2017 -0800
kernel32: Fix improper escaping of quotes in command line.
Signed-off-by: Jacob Lifshay <programmerjake(a)gmail.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
(cherry picked from commit c7ad47e9b29971509d8ea76e918b6f623ca52a17)
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/kernel32/process.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index 793f3ef..e1372fb 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -745,6 +745,10 @@ static void update_library_argv0( const WCHAR *argv0 )
* resulting in an odd number of '\' followed by a '"'
* '\"' -> '\\\"'
* '\\"' -> '\\\\\"'
+ * - '\'s are followed by the closing '"' must be doubled,
+ * resulting in an even number of '\' followed by a '"'
+ * ' \' -> '" \\"'
+ * ' \\' -> '" \\\\"'
* - '\'s that are not followed by a '"' can be left as is
* 'a\b' == 'a\b'
* 'a\\b' == 'a\\b'
@@ -787,7 +791,7 @@ static BOOL build_command_line( WCHAR **argv )
}
len+=(a-*arg)+1 /* for the separating space */;
if (has_space)
- len+=2; /* for the quotes */
+ len+=2+bcount; /* for the quotes and doubling of '\' preceding the closing quote */
}
if (!(rupp->CommandLine.Buffer = RtlAllocateHeap( GetProcessHeap(), 0, len * sizeof(WCHAR))))
@@ -800,6 +804,7 @@ static BOOL build_command_line( WCHAR **argv )
{
BOOL has_space,has_quote;
WCHAR* a;
+ int bcount;
/* Check for quotes and spaces in this argument */
has_space=has_quote=FALSE;
@@ -821,9 +826,7 @@ static BOOL build_command_line( WCHAR **argv )
/* Now transfer it to the command line */
if (has_space)
*p++='"';
- if (has_quote) {
- int bcount;
-
+ if (has_quote || has_space) {
bcount=0;
a=*arg;
while (*a!='\0') {
@@ -849,8 +852,14 @@ static BOOL build_command_line( WCHAR **argv )
WCHAR* x = *arg;
while ((*p=*x++)) p++;
}
- if (has_space)
+ if (has_space) {
+ int i;
+
+ /* Double all the '\' preceding the closing quote */
+ for (i=0;i<bcount;i++)
+ *p++='\\';
*p++='"';
+ }
*p++=' ';
}
if (p > rupp->CommandLine.Buffer)