Skip to content

Commit

Permalink
Fixed empty default argument bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Marcais committed Sep 10, 2015
1 parent 40bec13 commit 0ddc7a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/yaggo/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def default_val(val, type, *argv)
when :string, :c_string
"\"#{val || $type_default[type]}\""
when :uint32, :uint64, :int32, :int64, :int, :long, :double
"(#{$type_to_C_type[type]})#{val}"
val ? "(#{$type_to_C_type[type]})#{val}" : $type_default[type]
else
val.to_s || $type_default[type]
end
Expand Down

0 comments on commit 0ddc7a0

Please sign in to comment.