From 71a12130dea87656d39d456c5811b6c6ce86b532 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 11 Oct 2018 22:42:17 +0200 Subject: util.serialization: Make errors fatal by default (like the previous implementation) --- util/serialization.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/serialization.lua b/util/serialization.lua index 5a8eef81..628c9d33 100644 --- a/util/serialization.lua +++ b/util/serialization.lua @@ -103,7 +103,7 @@ local function new(opt) opt.equals = opt.equals or "="; end - local fallback = opt.fatal and fatal_error or opt.fallback or default_fallback; + local fallback = opt.fallback or opt.fatal == false and default_fallback or fatal_error; local function ser(v) return (types[type(v)] or fallback)(v); -- cgit v1.2.3