forked from security/hakurei
internal/app: copy parts of config to state
This is less error-prone than passing the address to the entire hst.Config struct, and reduces the likelihood of accidentally clobbering hst.Config. This also improves ease of testing. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -25,7 +25,7 @@ type spX11Op struct {
|
||||
}
|
||||
|
||||
func (s *spX11Op) toSystem(state *outcomeStateSys) error {
|
||||
if state.config.Enablements.Unwrap()&hst.EX11 == 0 {
|
||||
if state.et&hst.EX11 == 0 {
|
||||
return errNotEnabled
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user