From 32ca81763124a976dd90d97448ddf2f4f3ad75ab Mon Sep 17 00:00:00 2001 From: waiting <1661926154@qq.com> Date: Fri, 21 Jun 2024 14:24:27 +0800 Subject: [PATCH] ci: lint --- packages/win32-api/src/util/user32/GetWindowTextW.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/win32-api/src/util/user32/GetWindowTextW.ts b/packages/win32-api/src/util/user32/GetWindowTextW.ts index adfd1ccd..37829713 100644 --- a/packages/win32-api/src/util/user32/GetWindowTextW.ts +++ b/packages/win32-api/src/util/user32/GetWindowTextW.ts @@ -1,8 +1,9 @@ import assert from 'assert' -import { load, LibFns } from '##/lib/user32/index.js' import { bufferToString } from 'win32-def' +import { load, LibFns } from '##/lib/user32/index.js' + const fnName: keyof LibFns = 'GetWindowTextW' const fnAsyncName: keyof LibFns = 'GetWindowTextW_Async' @@ -30,7 +31,7 @@ export async function GetWindowTextW( const buf = Buffer.alloc(nMaxCount * 2) const resLength = await fn(hWnd, buf, nMaxCount) - const len2 = Math.min(resLength, (nMaxCount - 1)) + const len2 = Math.min(resLength, nMaxCount - 1) const title = bufferToString(buf, len2) return title ?? ''