summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean E. Russell <ser@ser1.net>2020-03-07 08:30:33 -0600
committerSean E. Russell <ser@ser1.net>2020-03-07 08:35:27 -0600
commit9188b14094ecb36fbea9ecdfe6247342a962e7d2 (patch)
tree0bc09cd59da476a88e61fe28dea14dc997c5d2d4
parentd14de8676b75882a367ccea41966726ac004e90c (diff)
Safety: prevent uninitialized variable use
Record change Fixes changelog
-rw-r--r--CHANGELOG.md8
-rw-r--r--colorschemes/registry.go6
2 files changed, 14 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9e5b2dc..72af996 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
> - **Fixed**: for any bug fixes.
> - **Security**: in case of vulnerabilities.
+## [3.5.1] - ??
+
+### Fixed
+
+- Removes verbose debugging unintentionally left in the code.
+- kitchensink referenced by, but not included in binary is now included.
+- Safety check prevents uninitialized colorscheme registry use
+
## [3.5.0] - 2020-03-06
The version jump from 3.3.x is due to some work in the build automation that necessitated a number of bumps to test the build/release, and testing compiling plugins from github repositories.
diff --git a/colorschemes/registry.go b/colorschemes/registry.go
index 97e2bb0..d79271d 100644
--- a/colorschemes/registry.go
+++ b/colorschemes/registry.go
@@ -9,6 +9,12 @@ import (
var registry map[string]Colorscheme
+func init() {
+ if registry == nil {
+ registry = make(map[string]Colorscheme)
+ }
+}
+
func FromName(confDir string, c string) (Colorscheme, error) {
cs, ok := registry[c]
if !ok {