summaryrefslogtreecommitdiffstats
path: root/libmsi/streams.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-12-06 16:29:06 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2012-12-06 20:30:34 +0100
commit1856684d6f63a5028109f87f9f30fe0b2d495937 (patch)
treeed20bf0bc477c917ab7c0fb806d43afcbda69f44 /libmsi/streams.c
parent7048dc3d2678791e803baac60722b98cd333da40 (diff)
downloadmsitools-1856684d6f63a5028109f87f9f30fe0b2d495937.tar.gz
msitools-1856684d6f63a5028109f87f9f30fe0b2d495937.tar.xz
msitools-1856684d6f63a5028109f87f9f30fe0b2d495937.zip
wine bug: accessing name in streams_view_set_row even if mask&1 == 0
Diffstat (limited to 'libmsi/streams.c')
-rw-r--r--libmsi/streams.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/libmsi/streams.c b/libmsi/streams.c
index 39e2630..d5d2aa5 100644
--- a/libmsi/streams.c
+++ b/libmsi/streams.c
@@ -141,14 +141,25 @@ static unsigned streams_view_set_row(LibmsiView *view, unsigned row, LibmsiRecor
if (r != LIBMSI_RESULT_SUCCESS)
return r;
- name = strdup(_libmsi_record_get_string_raw(rec, 1));
- if (!name)
- {
- WARN("failed to retrieve stream name\n");
- goto done;
+ if (sv->streams[row]) {
+ if (mask & 1) {
+ FIXME("renaming stream via UPDATE on _Streams table");
+ goto done;
+ }
+
+ stream = sv->streams[row];
+ name = strdup(msi_string_lookup_id(sv->db->strings, stream->str_index));
+ } else {
+ name = strdup(_libmsi_record_get_string_raw(rec, 1));
+ if (!name)
+ {
+ WARN("failed to retrieve stream name\n");
+ goto done;
+ }
+
+ stream = create_stream(sv, name, false, stm);
}
- stream = create_stream(sv, name, false, stm);
if (!stream)
goto done;