aboutsummaryrefslogtreecommitdiffstats
path: root/unpack.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2015-10-31 21:32:08 -0700
committerColin Cross <ccross@android.com>2015-10-31 21:33:32 -0700
commitecca05efb23c43093afeb97a922cdfdb7c6248f6 (patch)
tree27b98553c53c3a8c529c4234a14ca340c20a15d2 /unpack.go
parentf72ef5023cd2554eb28bc9457c1d3b64575ecc43 (diff)
downloadandroid_build_blueprint-ecca05efb23c43093afeb97a922cdfdb7c6248f6.tar.gz
android_build_blueprint-ecca05efb23c43093afeb97a922cdfdb7c6248f6.tar.bz2
android_build_blueprint-ecca05efb23c43093afeb97a922cdfdb7c6248f6.zip
Fix unpacking empty list
Add a test for unpacking empty list properties and fix a bug that resulted in nil slice instead of an empty slice.
Diffstat (limited to 'unpack.go')
-rw-r--r--unpack.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/unpack.go b/unpack.go
index e188d6f..445a8c6 100644
--- a/unpack.go
+++ b/unpack.go
@@ -293,7 +293,7 @@ func unpackSlice(sliceValue reflect.Value, property *parser.Property) []error {
}
}
- var list []string
+ list := []string{}
for _, value := range property.Value.ListValue {
if value.Type != parser.String {
// The parser should not produce this.