Allow header/footer margins of 0.

Issue #140.
This commit is contained in:
John McNamara 2018-02-03 16:51:41 +00:00
parent 18c8cb6dd2
commit ef35921595

View file

@ -4780,7 +4780,7 @@ worksheet_set_header_opt(lxw_worksheet *self, const char *string,
lxw_header_footer_options *options)
{
if (options) {
if (options->margin > 0)
if (options->margin >= 0.0)
self->margin_header = options->margin;
}
@ -4804,7 +4804,7 @@ worksheet_set_footer_opt(lxw_worksheet *self, const char *string,
lxw_header_footer_options *options)
{
if (options) {
if (options->margin > 0)
if (options->margin >= 0.0)
self->margin_footer = options->margin;
}