[vala] codegen: Fix array size variable on assignment
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] codegen: Fix array size variable on assignment
- Date: Sat, 2 Apr 2011 16:06:00 +0000 (UTC)
commit f4a2bd95c713714c0f7d8e7b53dfd8130416ab28
Author: Jürg Billeter <j bitron ch>
Date: Sat Apr 2 18:01:24 2011 +0200
codegen: Fix array size variable on assignment
The array size of the right-hand side should not be used as the copy may
have a different size.
Fixes bug 646294.
codegen/valaccodeassignmentmodule.vala | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/codegen/valaccodeassignmentmodule.vala b/codegen/valaccodeassignmentmodule.vala
index 1bc79f2..ab9285b 100644
--- a/codegen/valaccodeassignmentmodule.vala
+++ b/codegen/valaccodeassignmentmodule.vala
@@ -199,11 +199,7 @@ public class Vala.CCodeAssignmentModule : CCodeMemberAccessModule {
}
if (array_type.rank == 1) {
if (get_array_size_cvalue (lvalue) != null) {
- if (get_array_size_cvalue (value) != null) {
- ccode.add_assignment (get_array_size_cvalue (lvalue), get_array_size_cvalue (value));
- } else {
- ccode.add_assignment (get_array_size_cvalue (lvalue), get_array_length_cvalue (value, 1));
- }
+ ccode.add_assignment (get_array_size_cvalue (lvalue), get_array_length_cvalue (value, 1));
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]