Skip to content

Commit f23d8d9

Browse files
authored
Fix typos in code (bugfixes) (#26028)
Unlike #26024, these typo fixes are actual bugfixes. Ideally each of them is better accompanied by its own test, but for many fixes I'm not sure how to test it, and the fixes themselves look very obvious. Split out of #26014.
1 parent 420db67 commit f23d8d9

File tree

11 files changed

+32
-32
lines changed

11 files changed

+32
-32
lines changed

src/lib/libglfw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,7 @@ var LibraryGLFW = {
975975
err('glfwSetInputMode called with GLFW_LOCK_KEY_MODS mode not implemented');
976976
break;
977977
}
978-
case 0x000330005: { // GLFW_RAW_MOUSE_MOTION
978+
case 0x00033005: { // GLFW_RAW_MOUSE_MOTION
979979
err('glfwSetInputMode called with GLFW_RAW_MOUSE_MOTION mode not implemented');
980980
break;
981981
}

src/lib/libopenal.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3778,7 +3778,7 @@ var LibraryOpenAL = {
37783778
break;
37793779
default:
37803780
#if OPENAL_DEBUG
3781-
dbg(`alBufferData() called with invalid format ${format}`;
3781+
dbg(`alBufferData() called with invalid format ${format}`);
37823782
#endif
37833783
AL.currentCtx.err = {{{ cDefs.AL_INVALID_VALUE }}};
37843784
return;
@@ -3787,7 +3787,7 @@ var LibraryOpenAL = {
37873787
buf.audioBuf = audioBuf;
37883788
} catch (e) {
37893789
#if OPENAL_DEBUG
3790-
dbg(`alBufferData() upload failed with an exception ${e}`;
3790+
dbg(`alBufferData() upload failed with an exception ${e}`);
37913791
#endif
37923792
AL.currentCtx.err = {{{ cDefs.AL_INVALID_VALUE }}};
37933793
return;

src/lib/libwebsocket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ var LibraryWebSocket = {
161161
}
162162

163163
#if WEBSOCKET_DEBUG
164-
dbg(`emscripten_websocket_set_onopen_callback(socketId=${socketId},userData=${userData},callbackFunc='+callbackFunc})`);
164+
dbg(`emscripten_websocket_set_onopen_callback(socketId=${socketId},userData=${userData},callbackFunc=${callbackFunc})`);
165165
#endif
166166
socket.onopen = function(e) {
167167
#if WEBSOCKET_DEBUG

src/threadprofiler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ var emscriptenThreadProfiler = {
4848
if (threadName) {
4949
threadName = `"${threadName}" (${ptrToString(threadPtr)})`;
5050
} else {
51-
threadName = `(${ptrToString(threadPtr)}})`;
51+
threadName = `(${ptrToString(threadPtr)})`;
5252
}
5353

5454
console.log(`Thread ${threadName} now: ${PThread.threadStatusAsString(threadPtr)}. `);

src/wasm_worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function startWasmWorker(props) {
2828
#endif
2929
// Drop now unneeded references to from the Module object in this Worker,
3030
// these are not needed anymore.
31-
props.wasm = props.memMemory = 0;
31+
props.wasm = props.wasmMemory = 0;
3232
}
3333

3434
#if AUDIO_WORKLET

system/include/webgl/webgl2_ext.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ WEBGL_APICALL void GL_APIENTRY glMultiDrawElementsInstancedBaseVertexBaseInstanc
6767
const GLvoid* const* offsets __attribute__((nonnull)),
6868
const GLsizei* instanceCounts __attribute__((nonnull)),
6969
const GLint* baseVertices __attribute__((nonnull)),
70-
const GLuint* baseinstances __attribute__((nonnull)),
70+
const GLuint* baseInstances __attribute__((nonnull)),
7171
GLsizei drawCount);
7272

73-
#endif /* EMSCRIPTEN_GL_WEBGL_multi_draw_instanced_base_vertex_base_instance */
73+
#endif /* EMSCRIPTEN_GL_WEBGL_multi_draw_instanced_base_vertex_base_instance */

test/browser/test_glfw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ char* GetKeyName(int key){
213213
case GLFW_KEY_TAB: return "tab";
214214
case GLFW_KEY_ENTER: return "enter";
215215
case GLFW_KEY_BACKSPACE: return "backspace";
216-
case GLFW_KEY_INSERT: return "insertr";
216+
case GLFW_KEY_INSERT: return "insert";
217217
case GLFW_KEY_DEL: return "del";
218218
case GLFW_KEY_PAGEUP: return "page up";
219219
case GLFW_KEY_PAGEDOWN: return "page down";

test/codesize/audio_worklet_wasm.expected.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ var m = globalThis.Module || "undefined" != typeof Module ? Module : {}, p = !!g
22

33
function v(a) {
44
u = a;
5-
w = a.L;
5+
w = a.H;
66
x();
77
m ||= {};
88
m.wasm = a.G;
99
y();
10-
a.G = a.M = 0;
10+
a.G = a.H = 0;
1111
}
1212

1313
t && !p && (onmessage = a => {
@@ -26,9 +26,9 @@ if (p) {
2626
this.u = d.u;
2727
this.s = 4 * this.u;
2828
this.B = Array(Math.min((u.F - 16) / this.s | 0, 64));
29-
this.K();
29+
this.L();
3030
}
31-
K() {
31+
L() {
3232
for (var d = C(), g = D(this.B.length * this.s) >> 2, e = this.B.length - 1; 0 <= e; e--) this.B[e] = E.subarray(g, g += this.u);
3333
F(d);
3434
}
@@ -81,9 +81,9 @@ if (p) {
8181
port.onmessage = async b => {
8282
await z;
8383
b = b.data;
84-
b._boot ? v(b) : b._wpn ? (registerProcessor(b._wpn, a(b.H)), port.postMessage({
84+
b._boot ? v(b) : b._wpn ? (registerProcessor(b._wpn, a(b.I)), port.postMessage({
8585
_wsc: b.v,
86-
C: [ b.I, 1, b.A ]
86+
C: [ b.J, 1, b.A ]
8787
})) : b._wsc && A.get(b._wsc)(...b.C);
8888
};
8989
}
@@ -134,7 +134,7 @@ var K = [], L = a => {
134134
a = {
135135
latencyHint: c,
136136
sampleRate: G[a + 4 >> 2] || void 0,
137-
N: 0 > b ? "hardware" : b || "default"
137+
M: 0 > b ? "hardware" : b || "default"
138138
};
139139
} else a = void 0;
140140
a = new AudioContext(a);
@@ -178,8 +178,8 @@ var K = [], L = a => {
178178
}), c += 16;
179179
O[a].audioWorklet.port.postMessage({
180180
_wpn: d,
181-
H: e,
182-
I: a,
181+
I: e,
182+
J: a,
183183
v: b,
184184
A: h
185185
});
@@ -204,10 +204,10 @@ var K = [], L = a => {
204204
});
205205
e.port.postMessage({
206206
_boot: 1,
207-
O: ba++,
207+
N: ba++,
208208
G: m.wasm,
209-
L: w,
210-
J: c,
209+
H: w,
210+
K: c,
211211
F: b
212212
});
213213
e.port.onmessage = ca;
@@ -246,7 +246,7 @@ function y() {
246246
C = a.n;
247247
Y = a.o;
248248
A = a.k;
249-
t ? (Y(u.J, u.F), p || (removeEventListener("message", M), K = K.forEach(L), addEventListener("message", L))) : a.i();
249+
t ? (Y(u.K, u.F), p || (removeEventListener("message", M), K = K.forEach(L), addEventListener("message", L))) : a.i();
250250
t || X();
251251
}));
252252
}

test/codesize/hello_wasm_worker_wasm.expected.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ var c = Module, d = "em-ww" == globalThis.name, e, f, y, z, l, A, t;
33
d && (onmessage = a => {
44
onmessage = null;
55
e = a = a.data;
6-
f = a.o;
6+
f = a.l;
77
g();
88
c ||= {};
99
c.wasm = a.j;
1010
h();
11-
a.j = a.s = 0;
11+
a.j = a.l = 0;
1212
});
1313

1414
function g() {}
@@ -30,11 +30,11 @@ var k = [], n = a => {
3030
name: "em-ww"
3131
});
3232
m.postMessage({
33-
u: r,
33+
s: r,
3434
j: t,
35-
o: f,
36-
l: a,
37-
m: b
35+
l: f,
36+
m: a,
37+
o: b
3838
});
3939
m.onmessage = n;
4040
return r++;
@@ -67,7 +67,7 @@ function h() {
6767
y = b.g;
6868
z = b.i;
6969
l = b.h;
70-
d ? (z(e.l, e.m), removeEventListener("message", p), k = k.forEach(n), addEventListener("message", n)) : b.f();
70+
d ? (z(e.m, e.o), removeEventListener("message", p), k = k.forEach(n), addEventListener("message", n)) : b.f();
7171
d || y();
7272
}));
7373
}

test/codesize/test_minimal_runtime_code_size_audio_worklet.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"a.html": 519,
33
"a.html.gz": 357,
44
"a.js": 4309,
5-
"a.js.gz": 2219,
5+
"a.js.gz": 2217,
66
"a.wasm": 1329,
77
"a.wasm.gz": 895,
88
"total": 6157,
9-
"total_gz": 3471
9+
"total_gz": 3469
1010
}

0 commit comments

Comments
 (0)