Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/xray
diff options
context:
space:
mode:
Diffstat (limited to 'xray')
-rw-r--r--xray/log_writer.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/xray/log_writer.go b/xray/log_writer.go
index 5fc6b3d1..53358ca2 100644
--- a/xray/log_writer.go
+++ b/xray/log_writer.go
@@ -31,7 +31,7 @@ func (lw *LogWriter) Write(m []byte) (n int, err error) {
// Find level in []
startIndex := strings.Index(messageBody, "[")
endIndex := strings.Index(messageBody, "]")
- if startIndex != -1 && endIndex != -1 {
+ if startIndex != -1 && endIndex != -1 && startIndex < endIndex {
level := strings.TrimSpace(messageBody[startIndex+1 : endIndex])
msgBody := "XRAY: " + strings.TrimSpace(messageBody[endIndex+1:])