Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit c63c581

Browse files
committed
Add check for validity of timestampFormat
1 parent 992bdad commit c63c581

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/serialmonitor/serialMonitor.ts

+4
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ export class SerialMonitor implements vscode.Disposable {
232232
Logger.warn("No timestamp format inputted, keeping previous timestamp format.");
233233
return;
234234
}
235+
if (timestampFormat.indexOf("%") < 0) {
236+
Logger.warn("Invalid timestamp format, keeping previous timestamp format.", { value: timestampFormat });
237+
return;
238+
}
235239
if (!this._serialPortCtrl) {
236240
Logger.warn("Serial Monitor has not been started.");
237241
return;

0 commit comments

Comments
 (0)